# Fuzziness in text\_phrase query

**URL:** <https://discuss.elastic.co/t/fuzziness-in-text-phrase-query/4437>\
**Category:** Elasticsearch\
**Created:** [May 19, 2011, 2:04pm UTC](https://discuss.elastic.co/t/fuzziness-in-text-phrase-query/4437 "2011-05-19T14:04:32Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Yannick\_Smits\_2](https://avatars.discourse-cdn.com/v4/letter/y/a4c791/32.png) [@Yannick\_Smits\_2](https://discuss.elastic.co/u/Yannick_Smits_2)\
**Post date:** [May 19, 2011, 2:04pm UTC](https://discuss.elastic.co/t/fuzziness-in-text-phrase-query/4437/1 "2011-05-19T14:04:32Z")

</div>

It seems fuzziness can only be applied to the boolean variant of the new  
text query. Is there a way to do a text\_phrase query with fuzziness  
settings?

This is what I tried:

{ "query":{

```
"text" : {

    "_all" : {

        "query" : "this is my phrese",

        "type" : "phrase",

        "fuzziness": 0.5

    }

}

```

}

}

Thanks,

Yannick

---

<div class="post-metadata">

**Author:** ![kimchy](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/kimchy/32/44952_2.png) [@kimchy](https://discuss.elastic.co/u/kimchy)\
**Post date:** [May 19, 2011, 6:09pm UTC](https://discuss.elastic.co/t/fuzziness-in-text-phrase-query/4437/2 "2011-05-19T18:09:51Z")

</div>

No, there isn't an option to do that.  
On Thursday, May 19, 2011 at 5:04 PM, Yannick Smits wrote:

> It seems fuzziness can only be applied to the boolean variant of the new text query. Is there a way to do a text\_phrase query with fuzziness settings?
> 
> This is what I tried:
> 
> { "query":{  
> "text" : {  
> "\_all" : {  
> "query" : "this is my phrese",  
> "type" : "phrase",  
> "fuzziness": 0.5  
> }  
> }  
> }  
> }
> 
> Thanks,  
> Yannick

---

<div class="post-metadata">

**Author:** ![Yannick\_Smits\_2](https://avatars.discourse-cdn.com/v4/letter/y/a4c791/32.png) [@Yannick\_Smits\_2](https://discuss.elastic.co/u/Yannick_Smits_2)\
**Post date:** [May 19, 2011, 6:30pm UTC](https://discuss.elastic.co/t/fuzziness-in-text-phrase-query/4437/3 "2011-05-19T18:30:43Z")

</div>

Is that technically difficult to implement (performance) or is the feature just missing but might get there in the future? Maybe with Lucene 4?

From: Shay Banon [[mailto:shay.banon@elasticsearch.com](mailto:shay.banon@elasticsearch.com)]  
Sent: donderdag 19 mei 2011 20:10  
To: [users@elasticsearch.com](mailto:users@elasticsearch.com)  
Subject: Re: fuzziness in text\_phrase query

No, there isn't an option to do that.

On Thursday, May 19, 2011 at 5:04 PM, Yannick Smits wrote:

It seems fuzziness can only be applied to the boolean variant of the new text query. Is there a way to do a text\_phrase query with fuzziness settings?

This is what I tried:

{ "query":{

```
"text" : {

    "_all" : {

        "query" : "this is my phrese",

        "type" : "phrase",

        "fuzziness": 0.5

    }

}

```

}

}

Thanks,

Yannick

---

<div class="post-metadata">

**Author:** ![kimchy](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/kimchy/32/44952_2.png) [@kimchy](https://discuss.elastic.co/u/kimchy)\
**Post date:** [May 19, 2011, 6:33pm UTC](https://discuss.elastic.co/t/fuzziness-in-text-phrase-query/4437/4 "2011-05-19T18:33:38Z")

</div>

Need to dive into code to check if its possible. Should be, but yea, perf would suck.  
On Thursday, May 19, 2011 at 9:31 PM, Yannick Smits wrote:

> Is that technically difficult to implement (performance) or is the feature just missing but might get there in the future? Maybe with Lucene 4?
> 
> From: Shay Banon [[mailto:shay.banon@elasticsearch.com](mailto:shay.banon@elasticsearch.com)]  
> Sent: donderdag 19 mei 2011 20:10  
> To: [users@elasticsearch.com](mailto:users@elasticsearch.com)  
> Subject: Re: fuzziness in text\_phrase query
> 
> No, there isn't an option to do that.  
> On Thursday, May 19, 2011 at 5:04 PM, Yannick Smits wrote:
> 
> > It seems fuzziness can only be applied to the boolean variant of the new text query. Is there a way to do a text\_phrase query with fuzziness settings?
> > 
> > This is what I tried:  
> > { "query":{  
> > "text" : {  
> > "\_all" : {  
> > "query" : "this is my phrese",  
> > "type" : "phrase",  
> > "fuzziness": 0.5  
> > }  
> > }  
> > }  
> > }
> > 
> > Thanks,  
> > Yannick

---

<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, 4:05am UTC](https://discuss.elastic.co/t/fuzziness-in-text-phrase-query/4437/5 "2017-07-06T04:05:49Z")

</div>


