Doofinder logo

Support Documentation

Search icon

Relevance Criteria

Video last updated before 2024-12-31

This is a sensitive setting. In this sensitive context, Relevance Criteria directly impacts the display order of results. If you're experiencing unexpected outcomes and have been adjusting the relevance criteria, consider resetting this parameter. This feature was known as Custom Sorting.

Relevance criteria allows you to select in which order the result elements from a query will be displayed.

By default, Doofinder arranges searched products based on their relevance, determined by the score assigned by Doofinder's algorithm. This score is a numerical value assigned to each search result, reflecting how closely it aligns with the search goals. Results are sorted by this score, with the highest-scoring results appearing first. If you want to know more about the score, read the FAQ "What is the score and how is it calculated?".

However, there may be situations where multiple results have identical scores, and the search results do not align with your desired criteria. In such cases, the Relevance Criteria feature becomes invaluable. It allows you to define the sequence in which search results should display products.

Altering the relevance criteria may impact other configured Promotional Tools, such as Boosting and Custom Results. Therefore, it is advisable to keep the score on descending order as the primary rule. This ensures the search engine functions correctly, prioritizing the most relevant products.

In the event that you have configured Relevance Criteria, and the results are not as expected, you can easily reset this functionality and make adjustments as needed.

Relevance Criteria Fields

In addition to the score field, you can use other attribute fields such as price, sales quantity, availability, stock, etc. to set the display order of your results. Relevance Criteria can be done in ascending or descending order, either for numerical or alphabetical values.

  • Numerical values: Ascending order goes from 0 to 99999 and descending order goes from 99999 to 0.

  • Alphabetical values: An ascending alphabetical order sorts the text by the first letter of the first word, with "A" first, and "Z" last.

How to Configure Relevance Criteria

To access the Relevance Criteria feature in your Admin Panel, go to Search > Advanced Preferences > Relevance Criteria > Choose the Search Engine where you want to configure the relevance criteria from the SE dropdown menu in the top bar.

Find Relevance Criteria on Advanced Preferences

Next, pick a field from the dropdown menu, after clicking on the "+Add field" button and specify the desired order, whether ascending (Lowest to Highest) or descending (Highest to Lowest) for numerical values; or A to Z, Z to A for alphabetical values. Afterwards, save your settings by clicking on the "Save" button located at the bottom right of the screen.

The maximum number of fields recommended for sorting is five attributes, but for best search results, refrain from removing the score field from the first position.

The order in which the fields are placed is the order in which the criteria will be executed during the searches. For example, in the case that a product is tied by score, the following criteria will be applied to sort that product. And so on with the list of configured fields.

Therefore, it is advisable to always leave score descending (Highest to Lowest) in the first position and not to remove it from the Admin Panel.

To delete a field, click on the trash icon on the right side of the field.

When adding a new field, remember to place the score first

When to Use Relevance Criteria

Suppose you have products with the same search score. With Doofinder's Relevance Criteria feature, you can specify more than one relevance criteria from the list to add to "score".

Sorting with Numerical Values

In this example, we will choose the "price" field and then determine the sort order, either descending (Highest to Lowest) or ascending (Lowest to Highest).

Once the criteria preferences have been set, simply click the "Save" button to apply them. This method ensures that the initial criterion is based on "score" and, in the event of a tie, the "price" criterion is used to order the results.

Numerical Values order

Sorting with Alphabetical Values

In this example, we apply the availability field. When there are text fields, the ordering is done alphabetically, which is not always the best. But the exception is the availability field because it usually contains only two values: "in stock" and "out of stock", so in this case Doofinder can order alphabetically with ease.

This is a special case in which the score field can be placed in the second position of the list in descending order (Highest to Lowest), and the availability field in ascending order (Z to A) in first position, so that the results that will be displayed first will be those with availability "in stock", sorted by score, followed by the results "out of stock".

Alphabetical Order example

You can always reset the fields as often as you want. Relevance Criteria is not the same as Custom Results. Learn more on Custom Results.

Did you find this page helpful?