From dcb35e52454b2d9a5d971348cfca719fa09ab5f7 Mon Sep 17 00:00:00 2001 From: Gary Conroy Date: Wed, 16 Oct 2024 12:05:16 +0100 Subject: [PATCH] fix(specs): Separators are non-alphanumeric characters --- specs/common/schemas/IndexSettings.yml | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) diff --git a/specs/common/schemas/IndexSettings.yml b/specs/common/schemas/IndexSettings.yml index b89375ebcdc..396c7b69e10 100644 --- a/specs/common/schemas/IndexSettings.yml +++ b/specs/common/schemas/IndexSettings.yml @@ -212,12 +212,15 @@ baseIndexSettings: type: string example: +# description: | - Controls which separators are indexed. + Control which non-alphanumeric characters are indexed. + + By default, Algolia ignores [non-alphanumeric characters](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/how-to/how-to-search-in-hyphenated-attributes/#handling-non-alphanumeric-characters) like hyphen (`-`), plus (`+`), and parentheses (`(`,`)`). + To include such characters, define them with `separatorsToIndex`. Separators are all non-letter characters except spaces and currency characters, such as $€£¥. - By default, separator characters aren't indexed. + With `separatorsToIndex`, Algolia treats separator characters as separate words. - For example, a search for `C#` would report two matches. + For example, in a search for "Disney+", Algolia considers "Disney" and "+" as two separate words. default: '' x-categories: - Typos @@ -618,16 +621,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