Business rule actions define what actions are taken when a rule fires.
For more information, see Business Rules Actions Reference.
Descriptions
Banner
Display a user-defined banner message when the rule fires. The Banner URL value included in the response is used by the frontend, which displays the banner.
For example, a search for office dvd
can trigger the rule to include a banner URL in the results response. The frontend interprets this value and returns a results page that includes a special banner that advertises "The Office DVD boxed set: Now 50% off".
Block list
Block a list of specific documents from appearing in the results.
Boost attributes
Boost documents to a higher position within the results based on their attributes, such as color or manufacturer. For example, this action can be used to boost items where color="red"
when the incoming query contains red
.
When the condition is met, this action boosts documents by adding the bq
or boost
parameter to the incoming Solr request and executing a boost query. The primary difference is bq
is an "additive" boost, whereas boost
is a "multiplicative" boost. That is, bq
adds the pre-boost and post-boost document scores to perform the boost. On the other hand, boost
multiplies the document’s score value to perform the boost. Typically, the use of boost
is preferred over bq
.
Boost list
Boost a list of specific documents to a higher position within the results. For example, searches during the first weeks of December can return results with items on sale boosted to the top of the results.
Bury list
Suppress a list of specific documents to a lower position within the results. Use this action when you want to minimize certain results without blocking them.
Filter list
Change the results so only a specified set of content is shown. For example, a search for kids movies
can return only the titles whose MPAA_rating
field matches G
or PG
.
Ingroup actions
Ingroup actions apply to document groups. See FAQ for additional details.
Ingroup boost list
Boost a list of specific documents to a higher position within a group.
Ingroup bury list
Suppress a list of specific documents to a lower position within a group.
Redirect
Send users to a different URL instead of the search results. The Redirect URL value included in the response is used by the frontend, which performs the redirect.
For example, a search for black friday
can redirect users to a special sale page instead of a list of products that match black
and friday
.
Response value
Include an arbitrary, user-defined key-value pair as part of the results response. This is considered an arbitrary value.
For example, a Response Value rule can pass a key-value pair (e.g., specialTrigger: true
) to a downstream metrics tracking system in order to test how often a candidate rule would file if enabled.
Another example use for a Response Value rule is to pass an ad code value that the frontend can ingest to display an ad that targets the specific query:
"fusion": {
"ad-code": ["AD_CODE_99"],
"applicable_rules": [{
"id": "6NBtqjHu04",
...
}]
}
Set facets
Determine which facets are displayed to the user when a specific search query is made. For example, a search for tent
can display facets for the number of people the tents support, as indicated by the field name tentSize
.
Set Params
Corresponds to the Additional Query Parameters stage. This allows you to set, append, and remove Solr query parameters and permits the complex modeling of a rule.
For example, to override the default number of results returned for a specific query, assign a parameter name of row
, a parameter value of 30
, and an update policy of replace
. For another example, to return an additional field for a specific query, assign a parameter name of fl
(Field List), a parameter value of discountAmount
, and an update policy of append
.
FAQ
Boost rules display affected documents higher in the search results than they would normally appear. In many cases, a boost rule makes the document the first result. However, this is dependent on the score of the document in relation to others.
Pin rules give more control over what position the document occupies in search results. For example, a pin rule can make the document occupy the 5th result position, ensuring the top 4 results are still displayed as expected.
Bury rules display affected documents lower in the search results than they would normally appear. Typically, these documents are found at the end of the search results. However, this is dependent on the score of the document in relation to others.
Block rules prevent affected documents from displaying at all. Unlike buried documents, which are usually found at the end of the search results, blocked documents do not appear.
When their rule conditions are met, boost list, bury list, and pinned rules apply to all documents within the returned search results.
Ingroup rules, however, apply to documents inside of specific groups only. For example, a search for shoes
can return results grouped by their brand and model. Within the groups, there are different sizes and color variants. During Breast Cancer Awareness Month, an ingroup pinned rule can pin pink shoes, when available, to the top position within their group.
Banner, redirect, and response value rules return a value to the frontend as part of the results response without altering the results. However, a response value rule returns a generic, user-defined key-value pair instead of a specific value.
This behavior is unlike other rules, including boost or bury rules, which alter the results response.