# Score value in elastic search

**URL:** <https://discuss.elastic.co/t/score-value-in-elastic-search/12016>\
**Category:** Elasticsearch\
**Created:** [May 17, 2013, 9:55pm UTC](https://discuss.elastic.co/t/score-value-in-elastic-search/12016 "2013-05-17T21:55:10Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![shgeorge](https://avatars.discourse-cdn.com/v4/letter/s/5e9695/32.png) [@shgeorge](https://discuss.elastic.co/u/shgeorge)\
**Post date:** [May 17, 2013, 9:55pm UTC](https://discuss.elastic.co/t/score-value-in-elastic-search/12016/1 "2013-05-17T21:55:10Z")

</div>

Hi ES team  
Is it possible to use the value of the computed score(based on the boost  
supplied) and filter records based on the score value and a field defined  
in the document.

Eg: The score computed is 10 and my json doc has a field called  
"maxscore":15.  
Can we return only the docs when score \>= doc[maxscore]?

Thanks  
Sheeba

--  
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:** ![Clinton\_Gormley](https://avatars.discourse-cdn.com/v4/letter/c/50afbb/32.png) [@Clinton\_Gormley](https://discuss.elastic.co/u/Clinton_Gormley)\
**Post date:** [May 18, 2013, 11:39am UTC](https://discuss.elastic.co/t/score-value-in-elastic-search/12016/2 "2013-05-18T11:39:48Z")

</div>

Beware of relying on absolute values for the \_score. The \_score is  
normalized, and may not be what you expect. That said, you could use a  
custom\_score script to do something like: "(\_score \< doc['maxscore']) ? 0  
: \_score)" then set a min\_score of (eg 0.1) on your search, which will  
filter out the docs with score zero

On 17 May 2013 23:55, Sheeba George [sheeba.george@gmail.com](mailto:sheeba.george@gmail.com) wrote:

> Hi ES team  
> Is it possible to use the value of the computed score(based on the  
> boost supplied) and filter records based on the score value and a field  
> defined in the document.
> 
> Eg: The score computed is 10 and my json doc has a field called  
> "maxscore":15.  
> Can we return only the docs when score \>= doc[maxscore]?
> 
> Thanks  
> Sheeba
> 
> --  
> 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).

--  
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:35am UTC](https://discuss.elastic.co/t/score-value-in-elastic-search/12016/3 "2017-07-06T02:35:53Z")

</div>


