Priority rules: hard override behavior
Priority rules use conditional logic to force matching products to the top or bottom of results. They are always evaluated first as hard overrides, regardless of where they appear in the sort group. The behavior is determined by the rule’s direction setting:- Descending direction (Promote): Forces matching products to the top of results
- Ascending direction (Demote): Forces matching products to the bottom of results
- Promoted products always appear at the top, regardless of their metric values or boost scores
- Demoted products always appear at the bottom, regardless of their metric values or boost scores
- Within promoted, regular, and demoted groups, the other sort expressions (metrics, soft boosts, attributes) determine the ordering
Soft demotion for priority rules
When demoting products in a search context, you can enable soft demotion to apply relevance-damped demotion instead of hard binary demotion. This allows highly relevant products to resist demotion while weaker matches receive proportional demotion. How it works: Soft demotion uses a configurable relevance threshold to determine which products are affected by demotion:- Items with relevance score >= threshold → immune to demotion
- Items with relevance score < threshold → proportional demotion based on distance below threshold
- Higher threshold (e.g., 0.7): Only highly relevant items are immune; more products receive demotion
- Lower threshold (e.g., 0.3): More items are protected; only weak matches receive demotion
- Default (0.5): Balanced protection for moderately relevant items
- Soft field is enabled (
soft: true) - Search context (vector search is active, not browse)
- Demotion direction (direction = ‘asc’)
| Feature | Hard Demotion | Soft Demotion |
|---|---|---|
| Behavior | Binary - all matching products pushed to bottom | Threshold-based - items above threshold are immune, items below receive proportional demotion |
| Search context | Works in both search and browse | Only works in search (falls back to hard in browse) |
| Use case | Completely hide unwanted products | Reduce visibility while preserving relevance for best matches |
| Configuration | Default behavior | Enable soft: true toggle and set relevance threshold (default: 0.5) |
Available operators
When building priority rules, you can use various operators depending on the attribute type: Text operators:equals/does not equal- Exact match comparisoncontains/does not contain- Partial text matchingbegins with/does not begin with- Prefix matchingends with/does not end with- Suffix matchingin/not in- Match any value in a list (multi-select enabled in UI)is null/is not null- Check if attribute has a value (no value field shown in UI)
equals/does not equal- Exact numeric matchgreater than/greater than or equal- Value comparisonsless than/less than or equal- Value comparisonsbetween/not between- Range matching (requires two values)in/not in- Match any value in a list (multi-select enabled in UI)is null/is not null- Check if attribute has a value (no value field shown in UI)
equals/does not equal- Exact date matchafter/before- Date comparisonsbetween/not between- Date range matching (requires two values)is null/is not null- Check if attribute has a value (no value field shown in UI)
contains/does not contain- Check if tag existsin/not in- Match any tag in a list (multi-select enabled in UI)
When you select
is null or is not null operators, the value field is automatically hidden in the UI since these operators check for the presence or absence of data without requiring a comparison value.When to use null operators
Theis null and is not null operators are useful for filtering products based on whether an attribute has been set:
Example use cases:
inventory_quantity is null- Demote products with no inventory trackingcompare_at_price is not null- Promote products on sale (have a compare-at price)vendor is null- Demote products missing vendor informationmetafield.custom.priority is not null- Promote products with a custom priority field set