Define ranking, typos and missing words management
In the Ranking section, you can define the search settings related to:
- Boosting results
- Matching words
- Ranking function
- Tie breaker
To configure ranking, go to AI Search. Create or select the index on the list. Go to the Settings tab. In the appropriate Ranking section, click Define.
Boosting results
By using sliders, define how much each of the three indicators: page visits, transactions, and personalization affect the order of items in the search results.

Matching words
This option lets you control how items will be matched with the query phrase. By default, an item can be considered a match for the query phrase when one word from the searchable attributes is used in the phrase. Then, the item can be displayed in the search results.

Option name | Description |
---|---|
Minimum number of words that must match | Define the minimum number of words from the search query that the item’s searchable attributes must contain. |
Maximum number of words that can be omitted | Define the maximum number of words from the query phrase that an item doesn’t need to contain in its searchable attributes. |
At least one word must match | An item is considered a match for the query when at least one query word matches the searchable attributes. |
All words must match | An item is considered a match when every word from the query phrase is present in the item’s searchable attributes. |
Example
By default, when a customer searches for white shoes
, the search returns white shoes, but also other white items and shoes that are not white. To narrow down the results to white shoes
only, you can use the All words must match option.
Ranking function
In this section, you can choose between two methods of scoring items. The ranking function is used by the search engine to calculate the item’s relevance to a customer’s query. The relevance is one of the factors taken into account while scoring items. The items are returned in order according to their score.
You can select one of two options:
- The basic function - This option is not configurable.
- The adjustable function - This option contains two configurable parameters:

Option name | Description |
---|---|
Length of attributes | Adjust how the length of the document (the searchable attribute values) affects the distribution of score for an item when a word from the query matches the searchable attributes. An item gets a higher score when a word from the query matches attributes with fewer values (words) in contrast with the same word that matches longer attributes. The difference between the scores is controlled with this parameter; the higher the parameter, the bigger the difference will be. |
Word frequency | Each occurrence of a word in the query phrase that matches the searchable attributes will add an amount to the item score. The higher the value of the word frequency parameter, the less is added to the overall score after every occurrence of the same word in the searchable attribute importance group. |
Example
- A brand name is included in the
name
,brand
, andtitle
parameters of an item. - All the above attributes are searchable.
- The Word frequency parameter is set to a high value.
- A customer enters the brand name as the query.
Result:
This item is not scored higher than items that include the brand only in the brand
parameter.
Tie breaker

If a word from the query matches two or more searchable attributes and each of these attributes has a different importance level assigned, they contribute to the score of the item. The tie breaker parameter defines a weight by which the second (and subsequent) matched attribute is multiplied while adding to the score.
One way to use this mechanism is to assign two importance levels to an attribute while setting up searchable attributes. If a word from the query matches an attribute with two importance levels, that word adds more to the final score than a word that matches an attribute with one importance level.
Handling typos and missing words
To configure handling typos and missing words, go to AI Search. Create an index or select an existing one from the list. Go to the Settings tab. In the Handling typos and missing words section, click Define.
When a word from the query does not exist in the searchable attribute values, the search engine will find the best replacement. This is also used for handling typos and can happen in two ways:

- Popularity - The search engine compares words from the searchable attributes and suggests replacements based on word similarity but also takes the popularity of the suggested words into account.
- Accuracy - In this option, the similarity of the compared words is the key factor. The number of different letters between two words is evaluated and suggested phrases are provided.
Advanced options explained

Option name | Explanation |
---|---|
Maximum number of errors | You can define how many letter differences there can be between the missing word and words suggested by the search engine as replacements. |
Number of characters compared | While comparing the missing words from the query with the potential replacements, they are divided into smaller parts. These parts are compared with the same parts lengthwise in the indexed searchable attributes. With this parameter, you can specify how big these parts are. |
Use always | By default, the search engine will not use the suggested replacement for missing words if there are items that can be returned for the whole phrase. If the searched phrase contains more than one word, and one of them has a typo, the search engine will still be able to return items based on the correct words in the phrase. In this case the suggested word is not used. By enabling this option, the suggested word will always be used when searching for items. |
Disable typo tolerance for searchable attributes | By default, the search engine returns results even when a user makes a mistake while typing the search query. You can disable this behavior for situations when a user types a search query that is an item attribute (for example, a brand, item name, SKU, and so on). |
Disable typo tolerance for words | By default, the search engine returns results even when a user makes a mistake while typing the search query. You can disable this behavior for situations when a user a specific word. |
Enable typo tolerance for numeric values | By default, the search engine returns results if a search query is a numeric attribute and it is not an exact match. Disabling typo tolerance for numeric values lets you produce a search result only when values such as postal codes or SKUs are exact matches |