# Control fuzziness in a bool query

**URL:** <https://discuss.elastic.co/t/control-fuzziness-in-a-bool-query/22925>\
**Category:** Elasticsearch\
**Created:** [March 26, 2015, 2:57pm UTC](https://discuss.elastic.co/t/control-fuzziness-in-a-bool-query/22925 "2015-03-26T14:57:46Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Kirill](https://avatars.discourse-cdn.com/v4/letter/k/a9a28c/32.png) [@Kirill](https://discuss.elastic.co/u/Kirill)\
**Post date:** [March 26, 2015, 2:57pm UTC](https://discuss.elastic.co/t/control-fuzziness-in-a-bool-query/22925/1 "2015-03-26T14:57:46Z")

</div>

Hi,  
I'm combining match query(boolean) and match query(prefix) into bool query.  
{  
"bool" : {  
"must" : [ {  
"match" : {  
"field" : {  
"query" : "query\_1",  
"type" : "phrase\_prefix"  
}  
}  
}, {  
"match" : {  
"field" : {  
"query" : "query\_2",  
"type" : "boolean"  
}  
}  
} ]  
}  
}

I want to add fuzziness, but the problem is that I want to have sum of  
Levenshtein distance to be equal to 1 for both queries. Other words to make  
one mistake only in first or only in second query. Is it possible?  
Thank you in advance.

--  
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/ab39d942-0ca9-4236-8264-85b5e33b7a72%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/ab39d942-0ca9-4236-8264-85b5e33b7a72%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, 12:23am UTC](https://discuss.elastic.co/t/control-fuzziness-in-a-bool-query/22925/2 "2017-07-06T00:23:40Z")

</div>


