This article explains how the order of attributes in the searchableAttributes
array impacts search result relevancy.
title
, for example, might be more meaningful to a movie search than its overview
or its release_date
.
When searchableAttributes
is using its default value, [*]
, all fields carry the same weight.
If you manually configure the searchable attributes list, attributes that appear early in the array are more important when calculating search result relevancy.
title
field would have a higher impact on relevancy than the same words found in overview
or release_date
. If you searched for “1984”, for example, results like Michael Radford’s film “1984” would be ranked higher than movies released in the year 1984.
review.critic
becomes more important than its sibling review.user
when calculating a document’s ranking score.
attribute
rule’s position in rankingRules
determines how the results are sorted. Meaning, if attribute
is at the bottom of the ranking rules list, it will have almost no impact on your search results.