# ElasticSearch max and min score

**URL:** https://discuss.elastic.co/t/elasticsearch-max-and-min-score/119641
**Category:** Elasticsearch
**Created:** [February 13, 2018, 1:15pm UTC](https://discuss.elastic.co/t/elasticsearch-max-and-min-score/119641 "2018-02-13T13:15:31Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![yatishraaz](https://avatars.discourse-cdn.com/v4/letter/y/db5fbb/32.png) [@yatishraaz](https://discuss.elastic.co/u/yatishraaz)
#### Post date: [February 13, 2018, 1:15pm UTC](https://discuss.elastic.co/t/elasticsearch-max-and-min-score/119641/1 "2018-02-13T13:15:31Z")

</div>

I want to search the fields and apply a function to the doc score that includes the max and min score of the search result. I can use the script score but how I get the max and min scores in script?

---

<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: [March 13, 2018, 1:15pm UTC](https://discuss.elastic.co/t/elasticsearch-max-and-min-score/119641/2 "2018-03-13T13:15:43Z")

</div>

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