# Fuzzy query

**URL:** <https://discuss.elastic.co/t/fuzzy-query/3774>\
**Category:** Elasticsearch\
**Created:** [January 13, 2011, 10:58pm UTC](https://discuss.elastic.co/t/fuzzy-query/3774 "2011-01-13T22:58:50Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![lowang](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/lowang/32/3284_2.png) [@lowang](https://discuss.elastic.co/u/lowang)\
**Post date:** [January 13, 2011, 10:58pm UTC](https://discuss.elastic.co/t/fuzzy-query/3774/1 "2011-01-13T22:58:50Z")

</div>

hi, maybe i'm missing something but I can't get it to work.  
I've document like that:

curl -XPUT [http://localhost:9200/lowang/ets/1](http://localhost:9200/lowang/ets/1) -d '  
{  
"\_id":1,  
"title":"smartfon nokia 5250"  
}'

and fuzzy query like this runs fine:

curl -XGET [http://localhost:9200/lowang/ets/\_search](http://localhost:9200/lowang/ets/_search) -d '  
{  
"query" : {  
"fuzzy" : { "title" : "smrt fon" }  
}  
}'  
and I've got a hit.

however using following query which should be 100% match does not  
return anything:

curl -XGET [http://localhost:9200/lowang/ets/\_search](http://localhost:9200/lowang/ets/_search) -d '  
{  
"query" : {  
"fuzzy" : {  
"title" : {  
value: "smartfon nokia 5250"  
}  
}  
}  
}'

so please help, what am I doing wrong?

---

<div class="post-metadata">

**Author:** ![lowang](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/lowang/32/3284_2.png) [@lowang](https://discuss.elastic.co/u/lowang)\
**Post date:** [January 15, 2011, 12:54am UTC](https://discuss.elastic.co/t/fuzzy-query/3774/2 "2011-01-15T00:54:41Z")

</div>

I've found that following query will do the trick:

curl -XGET [http://localhost:9200/lowang/ets/\_search](http://localhost:9200/lowang/ets/_search) -d '{  
"query": {  
"bool": {  
"must":[  
{ "fuzzy": { "title": { "value" : "smrtfon" } } },  
{ "fuzzy": { "title": { "value" : "noia" } } }  
]  
}  
}}'

On Jan 13, 11:58 pm, Przemyslaw Wroblewski  
[przemyslaw.wroblew...@gmail.com](mailto:przemyslaw.wroblew...@gmail.com) wrote:

> hi, maybe i'm missing something but I can't get it to work.  
> I've document like that:
> 
> curl -XPUThttp://localhost:9200/lowang/ets/1-d '  
> {  
> "\_id":1,  
> "title":"smartfon nokia 5250"
> 
> }'
> 
> and fuzzy query like this runs fine:
> 
> curl -XGEThttp://localhost:9200/lowang/ets/\_search-d '  
> {  
> "query" : {  
> "fuzzy" : { "title" : "smrt fon" }  
> }}'
> 
> and I've got a hit.
> 
> however using following query which should be 100% match does not  
> return anything:
> 
> curl -XGEThttp://localhost:9200/lowang/ets/\_search-d '  
> {  
> "query" : {  
> "fuzzy" : {  
> "title" : {  
> value: "smartfon nokia 5250"  
> }  
> }  
> }
> 
> }'
> 
> so please help, what am I doing wrong?

---

<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:13am UTC](https://discuss.elastic.co/t/fuzzy-query/3774/3 "2017-07-06T04:13:53Z")

</div>


