API Reference / API Parameters / relevancyStrictness
Type: integer
Engine default: 100
Parameter syntax
'relevancyStrictness' => relevancy_strictness

Can be used in these methods:

About this parameter

Controls the relevancy threshold below which less relevant results aren’t included in the results.

Usage notes

  • relevancyStrictness is available on applications having the Relevant sort feature enabled.
  • You can set relevancyStrictness on virtual replicas only.
  • relevancyStrictness isn’t supported for browse.
  • The value must be an integer between 0 and 100 (inclusive).

By default, this parameter is set to 100, which is the maximum value to offer a relevant sort. If this behavior isn’t suited for you and to know what value works best for your use-case, you can:

  • Test your top queries with different values of relevancyStrictness until you’re satisfied with the balance between the relevancy of results and the number of returned hits.
  • If you have enough traffic on your sort, you can start an A/B test to test different values of relevancyStrictness and see which one works best.



The default value of 100 means that the engine only returns and sorts the top relevant results.


Returns hits with 90% similarity as compared to the most relevant hit.


From the attributes that you list in the Relevant sort customRanking, besides relevancy and sort results the engine also returns results up to paginationLimitedTo provided there is no timeout.


Set the default relevancy strictness for an index with Relevant sort

  'relevancyStrictness' => 90
$results = $index->search('query', [
  'relevancyStrictness' => 70
Did you find this page helpful?