Introduction to Plurals
In some domains, search queries might commonly be split between singular and plural forms — for example,
eyeglass ⇄ eyeglasses or
foot warmer ⇄ foot warmers ⇄ feet warmers. If not for plural handling, users would need to search for precisely the text in the products, rather than what felt natural.
Note that the inclusion of plurals doesn’t always improve search relevance, and it doesn’t make sense for every use case.
By default, Algolia does not consider singulars and plurals as matches:
"car" ≠ "cars" "foot" ≠ "feet"
Algolia’s default behavior can be changed with the ignorePlurals parameter. When enabled, ignorePlurals will make the engine consider “foot” and “feet” equivalent — they’re considered exact matches with zero typos.
This parameter can be:
- a boolean: enable or disable plurals for all supported languages;
- an array: list of language ISO codes for which plurals should be enabled.
For optimal relevance, it’s best to specify an array as the value for ignorePlurals, so that it’s only enabled for languages that are actually used in your data set.
Enabling all languages may cause side effects, with pairs of words being unexpectedly treated as equivalent.
ignorePlurals is supported in the following languages, with their associated ISO codes:
nl, Northern Sotho=
Continue building your Algolia knowledge with these concepts:
Did you find this page helpful?
We're always looking for advice to help improve our documentation!
Please let us know what's working (or what's not!).
We're constantly iterating thanks to the feedback we receive.