Skip to main content

Search Rules

Search Rules define merchandising behaviour inside a search rule group. Each rule matches shopper queries using a trigger and applies actions when the trigger fires.

Triggers

matchBehaviour
exactNormalized query must equal the trigger query (default)
containsTrigger query must appear as a substring in the normalized query

Query text is normalized (trimmed, lowercased, whitespace collapsed) before matching.

Actions

  • boosts: { condition, weight } pairs using standard filter syntax. Positive weights boost; negative weights bury.
  • pins: product IDs at global one-based result positions. Active filters still apply.
  • hides: product IDs removed from results; hide beats pin for the same product.
  • replace_query: one non-empty replacement query. The first rewrite wins and rule matching runs once more on the replacement.
  • filter_by: one validated expression ANDed with profile and shopper filters.

Rule evaluation

  • Rules are evaluated in one profile-wide pipeline: profile rule_groups array order, then rule execution_order.
  • Set stop_after_match: true to skip later rules, including rules in later attached groups.
  • execution_order must be unique within a group.

Example workflow

Create a group drill-boost, add an exact rule on query drill that boosts extensions.products(Details).BRAND-NAME:=Milwaukee by 100, then attach the group to a search profile's rule_groups array.

Ask External AI