Search relevancy scores
Search results are ordered by the relevancy scores of products or documents by default, from the most relevant matches to the least relevant matches.
- [Relevancy score: relevancy_score] product_nameFor example:
Alternatively, you can view relevancy scores outside store preview by checking the
trace.log log file for each document that is returned. Or you can specify
debugQuery=true
in the query URL in a web browser and observing the response.
HCL Commerce Search calculates relevancy scores by default by using several factors, including:
Calculating relevancy scores by using the Lucene scoring model
tf-idf
model. It involves a number of scoring factors:- Term Frequency
- The number of times that a term appears in a document.
- Inverse Document Frequency
- The rarer a term is across all documents in the index, the higher its contribution is to the score.
- Coordination Factor
- The more query terms that are found in a document, the higher its score.
- Field length
- The more words that a field contains, the lower its score.
- Index-time boost
- If a boost is specified for a document at index-time, scores for searches that match that
document are boosted.Note: HCL Commerce does not use index-time boosting, as it requires a full reindexing of the catalog.
- Query clause boost
- A user can explicitly boost the contribution of one part of a query over another.
- HCL Commerce Search relevancy boosts
- HCL Commerce Search relevancy boosts use query time boosts for specific indexed fields when constructing a search query.
- Search term associations and search rules in the Management Center
- Business users can use the Management Center tools to influence relevancy scores and search results in starter stores.
- Descriptive catalog information to boost relevancy
- Business users can use the Management Center tools to update the existing catalog information to be more descriptive.
Boosting relevancy scores
Site administrators can increase relevancy scores, for example, by changing the relevancy of search index fields, since depending on your store catalog, some search index fields might be more relevant than others for when shoppers search in the store.
Business users can increase relevancy scores, for example, by working with search term associations and search rules in the Management Center. These changes use query time boosts for specific indexed fields when constructing a search query.
Example
- Red Delicious Apples
- Crispin Apples

Where the search results are displayed in the order of their relevancy, with red delicious apples displayed first.
