Boost products in search results for Commerce
You can influence how search results are ranked and displayed by defining boosting rules. This can be useful, for example, when you want to promote or feature a particular brand, category of products, or a specific product. When a customer selects a sort order based on relevance, boosting rules are used to determine the order of the search results.
Commerce uses the standard SXA boosting functionality but adds commerce-specific fields to the index such as brand, manufacturer, and type of good. Boosting rules work only with the Commerce Search Results rendering and SXA Search Results rendering. They do not work with the Product List rendering.
For example, if you use the following boosting rule:
where the _displayname field contains Furry adjust boost by 100
when you search for headphones on the SXA Storefront and use the Relevance sort order option, you see the Furry Friends products, which were boosted to the top of the list.
Boosting is only used with the Relevance sort order option.
Boosting rules work only with the Commerce Search Results rendering and the SXA Search Results rendering. They do not work with the Product List rendering.
Create a boosting rule
You can create a boosting rule that is used locally for a particular item, or one that is part of a Commerce search scope. In this case, you are creating a boosting rule that is part of the Habitat catalog scope.
To create a boosting rule:
In the Content Editor, go to \sitecore\Content\<tenant>\<site>\Settings\Scopes and click Habitat catalog scope.
On the Content tab, in the Boosting section, click Edit rule.
In the Create rule dialog box, in the Fields section, click where the specific field compares to specific value and, in the Indexing & Search section, click adjust boost by select.
In the Edit rule box, click specific and, in the Message dialog box, enter _displayname and click OK.
Click compares and, in the Select Comparison dialog box, click contains, and then click OK.
Click specific value and, in the Message dialog box, enter Furry, and click OK.
In the second part of the rule, click select and, in the Message dialog box, enter 100 and click OK.
Boost values greater than 1 lift results to the top while boost values less than 1 move results to the bottom.
In the Create rule dialog box, click OK and, on the ribbon, click Save and then publish your changes.