- Type:
boolean
- Default:
false
- Scope:
settings
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 thanProximity
in your ranking formula. - Improves relevance when proximity matters more than attribute order in tie-breaking.
["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
Current API clients
Legacy API clients
Legacy API clients