# Min\_score in Elasticsearch

**URL:** https://discuss.elastic.co/t/min-score-in-elasticsearch/176508
**Category:** Elasticsearch
**Created:** [April 11, 2019, 10:28pm UTC](https://discuss.elastic.co/t/min-score-in-elasticsearch/176508 "2019-04-11T22:28:27Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![Shreya\_Jain](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/shreya_jain/32/43366_2.png) [@Shreya\_Jain](https://discuss.elastic.co/u/Shreya_Jain)
#### Post date: [April 11, 2019, 10:28pm UTC](https://discuss.elastic.co/t/min-score-in-elasticsearch/176508/1 "2019-04-11T22:28:27Z")

</div>

I have seen a lot of posts suggesting against the use of min\_score functionality. But it's important for my use case to display only high-quality results. Is there a way i can have the \_score returned from elasticsearch be customized to a cosine similarity score between 0 and 1? Or get a good estimate of a good match. Currently the same query gets different scores depending on the size of the data, thus making it difficult to set a min\_score. What's the best way to limit results?

---

<div class="post-metadata">

### Author: ![spinscale](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/spinscale/32/25011_2.png) [@spinscale](https://discuss.elastic.co/u/spinscale)
#### Post date: [April 12, 2019, 6:02pm UTC](https://discuss.elastic.co/t/min-score-in-elasticsearch/176508/2 "2019-04-12T18:02:35Z")

</div>

Maybe not the answer you hoped for, but: A score is just a number how well a document matched the query. If you have only one document that matches your query, but it does it only slighlty, is this considered a bad match and you rather do not want to present this single document to the user? I would personally do that.

My two cents: I think it makes more time to invest time to rewrite your queries to improve precision and recall instead of using min\_score to solve this.

---

<div class="post-metadata">

### Author: ![Shreya\_Jain](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/shreya_jain/32/43366_2.png) [@Shreya\_Jain](https://discuss.elastic.co/u/Shreya_Jain)
#### Post date: [April 12, 2019, 6:31pm UTC](https://discuss.elastic.co/t/min-score-in-elasticsearch/176508/3 "2019-04-12T18:31:34Z")

</div>

Thanks for the response! Yes, I would rather not show the document if it matches only slightly. My query is just a text field, and I'm using 'more like this' to get a document match. It looks something like this -  
"must": [{"more\_like\_this" : {  
"fields" : field\_list,  
"like" : query\_data,  
"min\_term\_freq" : 1,  
"max\_query\_terms" : 50,  
"min\_doc\_freq" : 1,  
"minimum\_should\_match" : min\_match}}]}}

Are there best practices to write a query for a text field?

---

<div class="post-metadata">

### Author: ![Shreya\_Jain](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/shreya_jain/32/43366_2.png) [@Shreya\_Jain](https://discuss.elastic.co/u/Shreya_Jain)
#### Post date: [April 19, 2019, 10:40pm UTC](https://discuss.elastic.co/t/min-score-in-elasticsearch/176508/4 "2019-04-19T22:40:25Z")

</div>

Anyone has more recommendations?

---

<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: [May 17, 2019, 10:40pm UTC](https://discuss.elastic.co/t/min-score-in-elasticsearch/176508/5 "2019-05-17T22:40:28Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
