# Fuzzy query returns nothing when value length is greather than one

**URL:** <https://discuss.elastic.co/t/fuzzy-query-returns-nothing-when-value-length-is-greather-than-one/14043>\
**Category:** Elasticsearch\
**Created:** [October 21, 2013, 3:50pm UTC](https://discuss.elastic.co/t/fuzzy-query-returns-nothing-when-value-length-is-greather-than-one/14043 "2013-10-21T15:50:57Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![rodrigoal](https://avatars.discourse-cdn.com/v4/letter/r/bc8723/32.png) [@rodrigoal](https://discuss.elastic.co/u/rodrigoal)\
**Post date:** [October 21, 2013, 3:50pm UTC](https://discuss.elastic.co/t/fuzzy-query-returns-nothing-when-value-length-is-greather-than-one/14043/1 "2013-10-21T15:50:57Z")

</div>

I've the following query:  
"query" : { "bool" : { "should" : [{ "fuzzy" : { "title" : { "min\_similarity" : 0.6, "boost" : 2, "value" : term } } }, { "fuzzy" : { "entities.text" : { "min\_similarity" : 0.6, "boost" : 3, "value" : term } } }], "minimum\_number\_should\_match": 1, } }  
If term is "Thompsn" I get the following results:  
results: 2 [{'entities': [u'Bill Thompson'], 'summary': u'Bill Thompson is con', 'title': u'Bill Thompson Concedes Democratic Nomination In NYC Mayor Race To Bill De Blasio: Report'}, {'entities': [], 'summary': u'AP\nThe Ravens took a', 'title': u'Ravens Pierce, Thompson getting checkedout'}]  
But if term is "Bill thompsn" I get 0 results. I don't know what I'm doing wrong, I've been reading the ES documentation but didn't find a way to solve this.

--  
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).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

**Author:** ![simonw\_2](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/simonw_2/32/1130_2.png) [@simonw\_2](https://discuss.elastic.co/u/simonw_2)\
**Post date:** [October 21, 2013, 8:25pm UTC](https://discuss.elastic.co/t/fuzzy-query-returns-nothing-when-value-length-is-greather-than-one/14043/2 "2013-10-21T20:25:22Z")

</div>

match\_query  
([Elasticsearch Platform — Find real-time answers at scale | Elastic](http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/query-dsl-match-query.html))  
with "fuzziness" : 0.6 should do what you are looking for

simon

On Monday, October 21, 2013 5:50:57 PM UTC+2, Mariano Alvarez wrote:

> I've the following query:
> 
> ```
> "query" : {
> "bool" : {
> "should" : [
> {
> "fuzzy" : {
> "title" : {
> "min_similarity" : 0.6,
> "boost" : 2,
> "value" : term
> }
> }
> },
> {
> "fuzzy" : {
> "entities.text" : {
> "min_similarity" : 0.6,
> "boost" : 3,
> "value" : term
> }
> }
> }                        
> ],
> "minimum_number_should_match": 1,
> }
> }
> 
> ```
> 
> If term is "Thompsn" I get the following results:
> 
> ```
> results: 2
> [{'entities': [u'Bill Thompson'],
> 'summary': u'Bill Thompson is con',
> 'title': u'Bill Thompson Concedes Democratic Nomination In NYC Mayor 
> 
> ```
> 
> Race To Bill De Blasio: Report'},  
> {'entities': ,  
> 'summary': u'AP\nThe Ravens took a',  
> 'title': u'Ravens Pierce, Thompson getting checkedout'}]
> 
> But if term is "Bill thompsn" I get 0 results. I don't know what I'm doing  
> wrong, I've been reading the ES documentation but didn't find a way to  
> solve this.

--  
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).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<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, 2:11am UTC](https://discuss.elastic.co/t/fuzzy-query-returns-nothing-when-value-length-is-greather-than-one/14043/3 "2017-07-06T02:11:20Z")

</div>


