Search rule evaluation
You can schedule multiple search rules at the same time for a specific keyword, or for all keywords, or a combination of both. If so, the search rules are evaluated and run in a specific sequence.
- First, search rules that target specific keywords or phrases are evaluated and run in order according to their Priority value.
- Next, search rules that target all keywords are evaluated and run in order according to their Priority value.
Note: A search rule influences the search results only if the
customer reaches the action element in the search rule flow. If the
search rule flow contains target elements before the action element,
the customer must meet the target criteria before the search rule
can influence the search result.
Evaluating search rules when multiple actions exist
You
can configure multiple search rules with different actions to be executed
in a single search request. The following table summarizes the compatibility
characteristics of the search rule actions. The actions listed in
the first column of the table are run as part of a higher priority
rule than the actions in the first row and, therefore, are run first:
Action executed in a lower priority rule | Action executed in a higher priority rule | ||||
Change Search Result Order (sorting) | Change Search Result Order (ranking) | Specify Top Search Result | Add or Replace Search Criteria (add) | Add or Replace Search Criteria (replace) | |
Change Search Result Order (sorting) | The result set is sorted according to the higher priority rule sorting criteria first, and lower priority rule sorting criteria second | The search result sorting takes priority over ranking | The search result sorting takes priority over the specified top search result | The search result scoped by the Add or replace search criteria action is sorted according to the sorting criteria specified in the Change Search Result Order action | The search results for the replaced keyword are sorted |
Change Search Result Order (ranking) | The search result ranking takes priority over sorting | The ranking criteria from both actions are used. In case of a collision when both actions have the same ranking criterion, the one from the higher priority rule takes precedence | Search results are ordered, but the top catalog entries are still displayed at the top of the search result | The search result scoped by the Add or replace search criteria action is ordered according to the ranking criteria specified in the Change Search Result Order action | The search results for the replaced keyword are ordered according to the ranking criteria |
Specify Top Search Result | The top search result takes priority, and the search results are not sorted | The search results are ranked, but top catalog entries are still displayed at the top of the search result | Either action's specified catalog entries are displayed first in search results, in order of their relevancy to the shopper's search terms, and in the order specified in the action (lower priority rule or higher priority rule) | Scoping the result set might remove the catalog entries from the Specify Top Search Result action | The search keyword is replaced, but the top catalog entries are still displayed at the top of the search result |
Add or Replace Search Criteria (add) | The search result scoped by the Add or Replace Search Criteria action is sorted according to the sorting criteria specified in the Change Search Result Order action | The search result scoped by the Add or Replace Search Criteria action is ordered according to the ranking criteria specified in the Change Search Result Order action | The filter is applied which might result in removing the catalog entries from the Specify Top Search Result action | The search criteria from both actions are used. In case of a collision when both actions have the same search criterion, the one from the higher priority rule takes precedence | The search results for the replaced keyword are scoped |
Add or Replace Search Criteria (replace) | The search results for the replaced keywords are sorted | The search results for the replaced keyword are ordered according to the ranking criteria | The search keyword is replaced, but top catalog entries are still displayed at the top of the search results | The search results for the replaced keyword are scoped | The action from the higher priority rule takes precedence |
Customers can optionally choose to further sort their search results in the storefront once their initial search results are displayed. In this case, the customer's sorting order takes priority over the action's sorting orders.
The following
table demonstrates how the behavior of the search rule actions is
influenced by the customer using specific sorting orders in the storefront:
User action | Action | |||
Change Search Result Order (sorting) | Change Search Result Order (ranking) | Specify Top Search Result | Add or Replace Search Criteria | |
Sort by any attribute available in the storefront, such as price, name, or brand | The customer's sorting order takes priority, and the action's sorting order is ignored | The customer's sorting order takes priority, and the action's ranking order is ignored | The customer's sorting takes priority, and the catalog entries specified in the action are still included in the result | The customer's sorting order is applied to the search result influenced by the Add or Replace Search Criteria action |