Scoring

The search engine calculates a relevance 'score' and ranks search results in that order.

The score is a calculation of how relevant a product is to the search term. Note that if two products both contained "a4 paper" in their description, they might receive different scores. A product would receive a higher score if the words "a4" or "paper" appeared more than once in the indexed text. Also a product with shorter indexed text would be scored higher, as it is considered more relevant if all the words are matched in a shorter description than in a longer one.

The score is calculated by considering the following:

The "Score" and "Boost" values are included in the search output when testing searches through the "Tools" Lucene Administration screen. The Boost Value is calculated at index time, so any changes to boost values require a reindex. Note that the Score displayed includes the boost value in its calculation (i.e. it is the score after boosting).

You can also include an explanation of the score by checking the "Explain" checkbox and clicking on the '>' at the beginning of the row. The Score is basically the addition and/or multiplication of several factors that impact the relevance of the term. These are:

From these base values 'fieldWeight' and 'queryWeight' are calculated. These are then multiplied to determine a 'weight' for the search phrase. Multiple search phrases are then added together to get the final score.

Boosting

The score can be boosted by several "artificial" factors:

Product Boost

Individual products can be boosted based on:

The boost factor applied is between 1 and a maximum number defined in the Lucene settings. Products with Boost Source Values below a threshold can also be ignored.

The boost values can also be allocated by rank (i.e. evenly from the lowest to the highest product) or by ratio, where the Boost Source Value is included in the boost calculation, rather than the rank of the value.

Boost Words

Products can be boosted based on whether their text contains certain values. As an example this feature can be used to boost certain brands. If we sell batteries, we can apply a boost factor of 2 to any battery containing the word "duracell", which means that brand of product would be considered more relevant than products without the word "duracell".

Similarly, you can use boost words to decrease the relevance of products. We can apply a boost factor of 0.2 to products containing the word "eveready", which would make those products less relevant.

Field Boost

The site administrator can also define multiple fields to be included in the search index, and can assign a boost factor to a particular field. For example, a product search index could contain a field for the product description and a field for the product category description. The category description could be given a boost factor > 1 to make search term matches in that field more relevant than the product description


Related help

Related articles appear here based on the labels you select. Click to edit the macro and add or change labels.