Boost search results for SXA site queries
Use the Content Editor for the steps described in this topic.
When searching for a term in an SXA site, the search engine goes through all SXA items and fields in the index. You can use search scopes to limit search results based on conditions. Within a scope, you can boost certain results by defining boosting rules. This adjusts the final score, changing the rankings of the returned results. For example, you can use boosting rules to promote the most popular books in a bookshop or to promote the sponsored pages of your website in the search results.
For a new scope, you build a search query that enables you to add several conditions. For example, for a search scope for weekend trips on a travel site, you can combine the location of the trips with the template that you use to describe the trips.
For every search scope, you can add boosting rules. For example, if for your weekend trip scope, you want to promote the trips to Amsterdam.
To create a boosting rule:
-
Navigate to /sitecore/content/Tenant/Site/Settings/Scopes/ and in the Boosting section, click Edit rule to add a new boosting rule.
-
Specify the conditions and assign the boosting values. For example, for a site that lists fruit, if you want the sour and yellow fruits to rank higher than the other fruits:
In the Create rule dialog box, there are specific predefined SXA boosting rules available. You can select a predefined condition from the list and then edit the condition. For example:
Condition |
Description |
---|---|
Where the specific field contains current page specific field content |
Boosts the results that contain the specific field on the specific page defined in the rule. For example: |
Where the page is tagged the same as the current page |
Boosts results for pages with the same tag. For example, if you use the tag sponsored for the current page, the results for pages with the same tag will be boosted. |
If you use the Sort Result rendering on your pages, the Title Asc and Title Desc sorting options take precedence over the boosting rule. To make the boosting rule work, add a sorting item to the Sort Result rendering and set the Direction to Relevance.