How Sitecore Search assembles results at runtime

Sitecore Search selects and orders search results from most to least relevant based on features you configure. The following outlines how Search chooses, then orders content items to ensure the most relevant ones appear at the top of search results.

How Search chooses results

When a visitor performs a search on your site, several factors affect which content items are shown to them and which are filtered out.

First, any active filters are applied. For example, if the site visitor selects the option to only show content items of type blog, other types of content are filtered out of potential matches before any other filtering is performed.

Then, pin and blacklist rules are applied. Pins and blacklists override filters and the relevance of content items to the visitor's search query, so even if a visitor has filtered certain content items out of results, they will still appear if they are pinned to a slot. Similarly, if an item is relevant to the visitor's search but is blacklisted, it will not appear in the results.

Next, the visitor's keyphrase is evaluated according to your textual relevance settings. For example, if the visitor enters the keyphrase credit card application, and you have configured textual relevance to use the name and description attributes, Search will look for the phrase credit card application in the names and descriptions of content items. These matches can by influenced by analyzers that you select when configuring textual relevance.

How Search orders results

By default, Sitecore Search uses a calculated value called the relevancy score to determine the order that search results are displayed. You can also specify certain attributes that can be used to order results by creating a sorting option.

Relevancy score

The relevancy score is a single value that is calculated dynamically using features such as textual relevance, personalization, ranking, and bury and boost rules. It is assigned to each content item in a results set, and is used to determine how relevant each item is to the visitor's search. Items with a higher relevancy score appear higher in search results. This score can change over time based on visitor interactions with your site.

Search calculates relevancy scores by first applying any textual relevance settings you've defined to the result set. This determines the base score for content items based on how well they match the keyphrase entered by the site visitor.

Note

If you have not configured textual relevance, or if the visitor does not enter a keyphrase, all items start with the same base score.

Once the base score is set, personalization, non-slotted boost rules, and ranking are applied in no specific order. These modifiers adjust the base score using criteria you set.

Finally, bury rules are applied. This happens last to ensure that other modifiers do not resurface buried items.

Attribute-based sorting

Although relevancy score is the default method used to order search results, you can change the order using attribute-based sorting options.

For example, if you create the option to sort in descending order by the publish_date attribute, and a visitor selects that sorting option in the UI before performing their search, the results are presented in order from newest to oldest date published.

Note

When an attribute-based sorting option is in use, the relevancy score is not even calculated.

Do you have some feedback for us?

If you have suggestions for improving this article,