Skip to main content

Documentation Index

Fetch the complete documentation index at: https://algolia.com/llms.txt

Use this file to discover all available pages before exploring further.

The attributeCriteriaComputedByMinProximity parameter changes how the best-matching attribute is selected when the Attribute comes before Proximity in the ranking formula. By default, when Attribute comes before Proximity in the ranking formula, matches are ranked by the attribute order in searchableAttributes. When this parameter is true, the engine uses minimum proximity instead to decide which attribute matches best.

Usage

  • Only applies when Attribute ranks higher than Proximity in your ranking formula.
  • Improves relevance when proximity matters more than attribute order in tie-breaking.
Suppose your searchable attributes are ["title", "author", "description"] and a record matches both title and description.
If proximity is lower in description but title appears earlier in the list:
  • With attributeCriteriaComputedByMinProximity: false (default), title is the best-matching attribute.
  • With attributeCriteriaComputedByMinProximity: true, description is the better match because of its lower proximity score.

Example

Current API clients

var response = await client.SetSettingsAsync(
  "INDEX_NAME",
  new IndexSettings { AttributeCriteriaComputedByMinProximity = true }
);
IndexSettings settings = new IndexSettings();
settings.AttributeCriteriaComputedByMinProximity = true;

index.SetSettings(settings);
Last modified on March 16, 2026