Understanding textual relevance

Textual relevance refers to how closely a potential result matches the visitor's search query. When you configure textual relevance, you tell Sitecore Search where in the content it needs to look for matching terms, and the relative importance it needs to give different content areas.


Textual relevance is not the same as relevancy score, despite the similar names.

For example, if you want Sitecore Search to look for matching terms in the names and descriptions of your content items, configure the name and description attributes for textual relevance.

To preserve the relevance of search results, we recommend using attributes with short values. The longer an attribute's values are, the more likely it is that they contain irrelevant information and the less useful they are for textual relevance.

You can specify multiple attributes for use with the textual relevance feature and give each attribute a weight in the global widget. This weight is used with other factors to calculate the relevancy score of each content item, which determines the order of the content items in search results.

For example, the Sitecore.com search page has several attributes configured for use with textual relevance. These attributes are, in order of descending weight, title, description, and subtitle. In other words, if a visitor searches for the term DXPs, Search looks for that term in the values of title, description, and subtitle. Search assigns more weight to content items that have the search term in the title compared to those that have it in the description or subtitle. If the search term appears in more than one attribute, the weights are added. This means that a content item with the search term in all three attributes is generally assigned the maximum weight for that search query.

However, textual relevance is not only based on whether a search term is present in the field. The context in which the term appears might also have an effect on the relevance of the content item; Sitecore Search can determine whether the term is a primary subject of the attribute or an incidental mention.

The following image shows a search for DXPs on the Sitecore.com search page. Notice that the top three search results include the search term in the title and the description.

Screenshot of Sitecore.com search page with "DXPs" typed in search bar and relevant search results displayed.

Search only looks for search terms in attributes that are enabled for textual relevance. For example, although Sitecore.com content items have a product attribute, it isn't used in textual relevance, so Search doesn't look for search terms in product values.

Each entity uses a distinct set of attributes for textual relevance. For example, the content entity uses the name, description, and tags attributes by default. You can configure the attributes used by each entity as required.

Analyzers and textual relevance

When you configure an attribute for use with textual relevance, it is assigned a default analyzer (either the Standard or Multi Locale Standard analyzer, depending on your implementation). Sitecore Search uses analyzers to transform input text into a structured format that is optimized for search. The default analyzer is the best one for most cases, but if you need to change or add analyzers, you can do so by clicking Administration > Domain Settings > Feature Configuration > Textual Relevance.

Do you have some feedback for us?

If you have suggestions for improving this article,