Skip to main content
  • Type: boolean
  • Default: false
  • Scope: settings
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

IndexSettings settings = new IndexSettings();
settings.AttributeCriteriaComputedByMinProximity = true;

index.SetSettings(settings);
IndexSettings settings = new IndexSettings();
settings.AttributeCriteriaComputedByMinProximity = true;

index.SetSettings(settings);
I