Sitecore Search : How to Configure Textual Relevance for Better Search Results
Textual relevance in Sitecore Search is determined by how closely a potential result matches the visitor’s search query. To configure textual relevance, you need to specify which content areas Sitecore Search should look for matching terms and the relative importance of each area. This blog is intended to demo on how to configure Textual Relevance on Sitecore Search to aim better search experience for customers.
- For example, If the attributes name and description are configured for textual relevance then Sitecore Search looks for matching terms in these attributes.
- Multiple attributes can be configured with the textual relevance feature.
- Each attribute can be give a Weight/Priority in the Global Widget Settings. This weight is used with other factors to determine the order of documents in search results.
- In the CEC portal, click Administration > Domain Settings. Under Attributes click on Add Attribute at the top right corner.
- Click Settings > Entity and choose the relevant entity. In the Display Name field, enter a display name for the attribute, e.g. Name
- In the Attribute Name field, enter the attribute's key e.g. Name. This value is used later in the source configuration
- On the Use For Features tab, select the Textual relevance option. Click Save and then, click Publish.
The next step is to configure textual relevance at the domain level
- In the CEC portal, click Administration > Domain Setting > Feature Configuration.
- Click Textual Relevance > Add Attribute.
- On the field where textual relevance needs to be added, click Add Analyzer and then click Add.
- By default, the analyzer Multi-Locale Standard Analyzer is already set on the attribute but as per the requirement it can be selected from the list available. Click Save and Publish.
- In the CEC, click Global Resources > Global Widget > Global Widget Settings > Textual Relevance. Click Advanced Mode.
- Here weightage can be assigned numeric values for different attribute/analyzer combinations.
- To include an attribute, click Include.
- In the WEIGHT column, assign a weight to the attribute, e.g. enter 2 for Name and 1 for Description.
- Click Save and Publish.