Search Relevance order

I found an example of 3 products that have the same semantic similarity value, the default sort order is Relevance, revenue (custom field), in_stock (custom field)

I would like to know what influence the decision of which product to show first if all have the same semantic similarity, I would expect that in that case it will take the revenue as the second parameter to order them, which would cause the third product to be first, and the first to be third. But seems like that is not happening.

Would appreciate to have some input into how the algorithm decides which product shows first in these cases

Hi Alejandro,

If several entity results have the exact same relevance score (so the exact same semantic similarity, and the same relevance from text / phrase matches), then we use an internal / immutable unique ID for each entity as the final tiebreak. You can see this ID in the URL for any Entity.

Note that in general, assuming the content for the entities are unique, this should be fairly rare. Text Search for instance also considers the relative importance of each token in the entity, and in the result set overall (this is based on the BM25 algorithm), so even the exact same number of token matches may not produce the same relevance score for different results.

If you have not seen it already, you can read more about the exact mechanisms of the search algorithm here.

Best,
Alex