Configuring Fuzzy Search in Elasticsearch for Non-Dictionary Words

I am encountering an issue with fuzzy search in Elasticsearch. When a user searches for the term "cooler", I want only products that match that exact term to be returned, and I do not want products with similar terms like "cooker" to be included in the results. However, when a user searches for a similar term like "coozer" or "coqler", I want both "cooler" and "cooker" products to be returned in the results.

In summary, I want fuzzy search to only return exact matches for the search term "cooler", but to return both "cooler" and "cooker" products when non-dictionary words are used.

I suspect that could work as a single query with Bool queries expressing this pseudo code:

cooler OR (NOT cooler AND cooler~)

So , exact match or a fuzzy match with no exact matches.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.