本文解释了 `searchableAttributes` 数组中属性的顺序如何影响搜索结果的相关性。
索引设置 | 影响条件 | 原因 |
---|---|---|
searchableAttributes | 使用 `attribute` 排名规则时 | `attribute` 排名规则根据查询词出现的属性对文档进行评分。顺序由 `searchableAttributes` 决定 |
rankingRules | 始终 | 分数是通过计算每个排名规则的子分数并根据其顺序赋予权重来计算的 |
stopWords | 始终 | 停用词影响 `words` 排名规则,该规则几乎总是被使用 |
synonyms | 始终 | 同义词影响 `words` 排名规则,该规则几乎总是被使用 |
typoTolerance | 使用 `typo` 排名规则时 | 用于计算查询的最大错别字数量 |