# Fuzzy like this prefers partial match over an exact one

**URL:** <https://discuss.elastic.co/t/fuzzy-like-this-prefers-partial-match-over-an-exact-one/18086>\
**Category:** Elasticsearch\
**Created:** [June 13, 2014, 4:32am UTC](https://discuss.elastic.co/t/fuzzy-like-this-prefers-partial-match-over-an-exact-one/18086 "2014-06-13T04:32:08Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Alexey\_Kotlyarov](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/alexey_kotlyarov/32/1386_2.png) [@Alexey\_Kotlyarov](https://discuss.elastic.co/u/Alexey_Kotlyarov)\
**Post date:** [June 13, 2014, 4:32am UTC](https://discuss.elastic.co/t/fuzzy-like-this-prefers-partial-match-over-an-exact-one/18086/1 "2014-06-13T04:32:08Z")

</div>

When making FLT queries, a partial match is preferred over an exact match.  
Here is a reproduction:

# Create a dummy index

curl -s -XDELETE [http://localhost:9200/maori](http://localhost:9200/maori) \>/dev/null || true

# Partial match

curl -s -XPUT [http://localhost:9200/maori/idx/1](http://localhost:9200/maori/idx/1) -d '{ "text": "penguin" }'

> /dev/null

# Exact match

curl -s -XPUT [http://localhost:9200/maori/idx/2](http://localhost:9200/maori/idx/2) -d '{ "text": "submarine  
penguin" }' \>/dev/null

# Refresh

curl -s -XPOST [http://localhost:9200/maori/\_refresh](http://localhost:9200/maori/_refresh) \>/dev/null

# Query

curl -s -XGET [http://localhost:9200/maori/idx/\_search](http://localhost:9200/maori/idx/_search) -d '  
{  
"query": {  
"flt": {  
"like\_text": "submarine penguin"  
}  
}  
}  
'

I expect "submarine penguin" to be first, but it is returned second, with a  
lower score (0.27 vs. 0.3).

How do I get the first result to score better than the second one?

Elasticsearch version: 1.2.1

--  
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/539f9213-1391-4e84-85ac-951e8638cff3%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/539f9213-1391-4e84-85ac-951e8638cff3%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-like-this-prefers-partial-match-over-an-exact-one/18086/2 "2017-07-06T01:22:50Z")

</div>


