# Configuring Fuzzy Search in Elasticsearch for Non-Dictionary Words

**URL:** <https://discuss.elastic.co/t/configuring-fuzzy-search-in-elasticsearch-for-non-dictionary-words/332519>\
**Category:** Elasticsearch\
**Created:** [May 4, 2023, 8:47am UTC](https://discuss.elastic.co/t/configuring-fuzzy-search-in-elasticsearch-for-non-dictionary-words/332519 "2023-05-04T08:47:48Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Gurjap\_Singh](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/gurjap_singh/32/120477_2.png) [@Gurjap\_Singh](https://discuss.elastic.co/u/Gurjap_Singh)\
**Post date:** [May 4, 2023, 8:47am UTC](https://discuss.elastic.co/t/configuring-fuzzy-search-in-elasticsearch-for-non-dictionary-words/332519/1 "2023-05-04T08:47:49Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Mark\_Harwood1](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/mark_harwood1/32/101255_2.png) [@Mark\_Harwood1](https://discuss.elastic.co/u/Mark_Harwood1)\
**Post date:** [May 4, 2023, 3:31pm UTC](https://discuss.elastic.co/t/configuring-fuzzy-search-in-elasticsearch-for-non-dictionary-words/332519/2 "2023-05-04T15:31:55Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [June 1, 2023, 3:32pm UTC](https://discuss.elastic.co/t/configuring-fuzzy-search-in-elasticsearch-for-non-dictionary-words/332519/3 "2023-06-01T15:32:37Z")

</div>

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