# Fuzzy query

**URL:** <https://discuss.elastic.co/t/fuzzy-query/18076>\
**Category:** Elasticsearch\
**Created:** [June 12, 2014, 6:17pm UTC](https://discuss.elastic.co/t/fuzzy-query/18076 "2014-06-12T18:17:06Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![hitchhikar](https://avatars.discourse-cdn.com/v4/letter/h/df705f/32.png) [@hitchhikar](https://discuss.elastic.co/u/hitchhikar)\
**Post date:** [June 12, 2014, 6:17pm UTC](https://discuss.elastic.co/t/fuzzy-query/18076/1 "2014-06-12T18:17:06Z")

</div>

Hi  
My question is re fuzzy query.  
I have indexed products and searching on the title field.  
As i want to accommodate for typos, I am doing a fuzzy search with  
edit\_distance 1.  
The issue is that for a query "shirt" , products matched are with one  
having "shirt" and "short" in title (due to fuzziness)

Altho I am able to boost shirt over short in resultset, but nonetheless  
shorts are still coming down in results which makes it look weird for the  
end user.  
How can i make sure that if exact matches are found then fuzzy ones are not  
returned?

Thanks

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/6fdee1fb-225d-43b6-b306-eb36c76b95f7%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/6fdee1fb-225d-43b6-b306-eb36c76b95f7%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![hitchhikar](https://avatars.discourse-cdn.com/v4/letter/h/df705f/32.png) [@hitchhikar](https://discuss.elastic.co/u/hitchhikar)\
**Post date:** [June 12, 2014, 8:33pm UTC](https://discuss.elastic.co/t/fuzzy-query/18076/2 "2014-06-12T20:33:23Z")

</div>

Is there somequery type where I can write 'n' queries (in array...a chain)  
so that ES executes them seqeuntially and there is a break condition in  
every query to not execute any further query in chain if the break  
condition is met?  
Will be immensely useful if this feature can be provided!

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/bf2571f4-2fb5-448a-b316-68e5a4faf77f%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/bf2571f4-2fb5-448a-b316-68e5a4faf77f%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![eunever32](https://avatars.discourse-cdn.com/v4/letter/e/e68b1a/32.png) [@eunever32](https://discuss.elastic.co/u/eunever32)\
**Post date:** [June 12, 2014, 9:23pm UTC](https://discuss.elastic.co/t/fuzzy-query/18076/3 "2014-06-12T21:23:46Z")

</div>

You could index the data twice  
Once analysed. Once not analysed.  
Then query not analysed.  
And if results then display those.  
Otherwise query the analysed and display those. ?

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/57bc7d7b-5bcb-4242-b8d6-c6b8f940d6df%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/57bc7d7b-5bcb-4242-b8d6-c6b8f940d6df%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<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:** [July 6, 2017, 1:22am UTC](https://discuss.elastic.co/t/fuzzy-query/18076/4 "2017-07-06T01:22:54Z")

</div>


