Skip to main content

Options

100
Default value. Returns and sorts only the top relevant results.
90
Includes records with at least 90% similarity to the most relevant result.
Returns up to paginationLimitedTo results (if there’s no timeout), sorted using the customRanking of your relevant sort.

Usage

  • Only available on applications with the Relevant sort feature enabled.
  • Can only be set on virtual replicas.
  • Accepts integer values from 0 to 100 (inclusive).
  • Lower values include more results but may reduce precision.
  • You can test values manually or through an A/B test to find the optimal balance between result relevancy and recall.

Examples

Current API clients

Set the default relevancy strictness for an index with Relevant sort

var response = await client.SetSettingsAsync(
  "ALGOLIA_INDEX_NAME",
  new IndexSettings
  {
    CustomRanking = new List<string> { "asc(textual_attribute)" },
    RelevancyStrictness = 0,
  }
);
var response = await client.SearchSingleIndexAsync<Hit>(
  "ALGOLIA_INDEX_NAME",
  new SearchParams(new SearchParamsObject { Query = "query", RelevancyStrictness = 70 })
);

Set the default relevancy strictness for an index with Relevant sort

var settings = new IndexSettings();
settings.RelevancyStrictness = 90;

Override the default relevancy strictness for the current search

index.Search(new Query("query")
{
    RelevancyStrictness = 70
});
I