Custom Sorting

Custom sorting allows you to select in which order the result elements from a query will be displayed. By default, Doofinder displays searched products according to their relevance (score), of which the boost factor is a part of this score calculation. Sometimes, some scores may be tied. In these cases, you can use the Custom Sorting feature to organize the order in which a search should display the products.

To access this Custom sorting in your Admin Panel, go to: Search Engines > Settings > Custom Sorting.

go to custom sorting

To set the display order you can use other categories such as colour, price, sales quantity, availability, stock, size, etc. in addition to the score category. Sorting can be done in ascending or descending order, either for numerical or alphabetical values.

Numerical values:

  • Ascending order goes from 0 > 99999 and descending order goes from 99999 > 0

Alphabetical values:

  • An ascending alphabetical order sorts the text by the first letter of the first word, with «A» first and «Z» last.
custom sorting fields

If the sort fields are text fields, the sorting is done in alphabetical order, which is not the best. The exception is the availability field because it normally contains only two values: in stock and out of stock so that Doofinder can sort alphabetically.

Let’s say you have products whose search score is a tie but have different prices. Using Doofinder’s custom sorting, you can choose a field… from the drop-down list; in this case, we will select the ‘price’ field and then select the field’s Order as descending or ascending. Hit the Save button once you’re done adding fields.

go to custom sorting

You can add as many fields as you wish using custom sorting. For best search results, refrain from removing the score field in the custom sorting section.

📌 Note: You can always reset the fields as often as you want. Custom Sorting is not the same as Custom Results.