Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(specs): alternativesAsExact is plurals and synonyms #3974

Merged
merged 2 commits into from
Oct 15, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 9 additions & 3 deletions specs/common/schemas/IndexSettings.yml
Original file line number Diff line number Diff line change
Expand Up @@ -618,16 +618,22 @@ indexSettingsAsSearchParams:
items:
$ref: '#/alternativesAsExact'
description: |
Alternatives of query words that should be considered as exact matches by the Exact ranking criterion.
Determine which plurals and synonyms should be considered an exact matches.

By default, Algolia treats singular and plural forms of a word, and single-word synonyms, as [exact](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#exact) matches when searching.
For example:

- "swimsuit" and "swimsuits" are treated the same
- "swimsuit" and "swimwear" are treated the same (if they are [synonyms](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/adding-synonyms/#regular-synonyms)).

- `ignorePlurals`.
Plurals and similar declensions added by the `ignorePlurals` setting are considered exact matches.

- `singleWordSynonym`.
Single-word synonyms, such as "NY/NYC" are considered exact matches.
Single-word synonyms, such as "NY" = "NYC", are considered exact matches.

- `multiWordsSynonym`.
Multi-word synonyms, such as "NY/New York" are considered exact matches.
Multi-word synonyms, such as "NY" = "New York", are considered exact matches.
default: [ignorePlurals, singleWordSynonym]
x-categories:
- Query strategy
Expand Down
Loading