Text Relevance in HCL Commerce Search

The Query service includes a sophisticated set of search expression providers, which improve the relevance of search results. A comprehensive guide is provided for you to use in tuning the Query service for better relevance.

Search relevance operates differently in Elasticsearch than in Solr. When migrating from Solr to Elasticsearch, one immediate result you may notice is that there are fewer search results. This is expected and is desirable because the new search system is more efficient at filtering out irrelevant search results.

One of the reasons why is that the new search is better at dealing with free-form search terms. For instance if you search in the Aurora store for "Get up and go," Solr will return hits on every one of the words in the string, but (particularly if you have enclosed the string in quotes to declare it as a single term or, eg., brand name), HCL Commerce Search Version 9.1 will take the phrase as a whole and not return products that merely use one or two of the words making it up. The exception is when the phrase is not found at all, in which case the Query service will begin looking for the components of the phrase.

For example, if you search in the Aurora Sample Store for the term dress shoes (not in quotes) the results will differ markedly depending on whether you are using Solr or the V9.1 Query service. A Solr search will return around one hundred items from the catalog, because it looks for every instance of the words "dress" and "shoe."

The results will include beige pumps, red sneakers, skirts and shirts, and even unrelated items such as belts.

The Query service, in contrast, will return a handlful of matches, all of which are men's dress shoes.

This happens because by default the V9.1 search service works on the phrase as a whole, and only reverts to matching individual words if it cannot find relevance to that phrase. Note that it also breaks phrases down into their constituent parts, so that it recognizes "dress" as an adjective, and "shoes" as the noun.

The Query service does not have to recognize every possible phrase that might refer to a product. In this example, the catalog contains a category named "shoes." The Query service is therefore able to bound its search space within a known category. While there is also a "dresses" category in Aurora, the service will not find products that are shoe dresses, but it will find products that are dress shoes.

Search term expression providers

The Query system comes with a set of default search expression providers. These providers generate the necessary metadata to give you a comprehensive understanding of how your input search term is broken down and analysed. This search breakdown provides essential insights into how your search query is processed, ensuring that the results are accurate and aligned with your intent. The following documents describe these default providers and the data you can retrieve using them.