# Min score

**URL:** https://discuss.elastic.co/t/min-score/80398
**Category:** Elasticsearch
**Created:** [March 29, 2017, 3:54am UTC](https://discuss.elastic.co/t/min-score/80398 "2017-03-29T03:54:17Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![Greentea](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/greentea/32/15924_2.png) [@Greentea](https://discuss.elastic.co/u/Greentea)
#### Post date: [March 29, 2017, 3:54am UTC](https://discuss.elastic.co/t/min-score/80398/1 "2017-03-29T03:54:18Z")

</div>

Hi!  
I want to ask is it possible to use the highest score to calculate the min score?

Just like the min score is equal to the half of the highest score?

may be like

```
"min_score": max_score/2
```

---

<div class="post-metadata">

### Author: ![jpountz](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jpountz/32/45836_2.png) [@jpountz](https://discuss.elastic.co/u/jpountz)
#### Post date: [March 29, 2017, 7:08am UTC](https://discuss.elastic.co/t/min-score/80398/2 "2017-03-29T07:08:11Z")

</div>

Can you be more explicit, you want to compute the minimum score across what kind of scores? Sub queries? Nested documents? Something else?

---

<div class="post-metadata">

### Author: ![Greentea](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/greentea/32/15924_2.png) [@Greentea](https://discuss.elastic.co/u/Greentea)
#### Post date: [March 29, 2017, 8:41am UTC](https://discuss.elastic.co/t/min-score/80398/3 "2017-03-29T08:41:25Z")

</div>

@jpountz Thank you for your reply

```
{
  "took": 39,
  "timed_out": false,
  "_shards": {
"total": 5,
"successful": 5,
"failed": 0
  },
  "hits": {
"total": 4873,
"max_score": 9.238034,

```

I want to use the above max\_score to compute the minimum score. Then it would be used to filter the results which are lower than max\_score / 2.

---

<div class="post-metadata">

### Author: ![jpountz](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jpountz/32/45836_2.png) [@jpountz](https://discuss.elastic.co/u/jpountz)
#### Post date: [March 29, 2017, 8:49am UTC](https://discuss.elastic.co/t/min-score/80398/4 "2017-03-29T08:49:45Z")

</div>

This is a somewhat dangerous approach given that scores are not percentages of how well a document matches. That said, if you really want to do that, you will need to issue a first search request whose only purpose is to compute the maximum score, and a second request that passes max\_score/2 as a value for the `min_score` option: [https://www.elastic.co/guide/en/elasticsearch/reference/current/search-request-min-score.html](https://www.elastic.co/guide/en/elasticsearch/reference/current/search-request-min-score.html).

---

<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: [April 26, 2017, 8:50am UTC](https://discuss.elastic.co/t/min-score/80398/5 "2017-04-26T08:50:14Z")

</div>

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