# Filter by a score threshold

**URL:** <https://discuss.elastic.co/t/filter-by-a-score-threshold/5502>\
**Category:** Elasticsearch\
**Created:** [October 3, 2011, 1:51pm UTC](https://discuss.elastic.co/t/filter-by-a-score-threshold/5502 "2011-10-03T13:51:12Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![frazer](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/frazer/32/2752_2.png) [@frazer](https://discuss.elastic.co/u/frazer)\
**Post date:** [October 3, 2011, 1:51pm UTC](https://discuss.elastic.co/t/filter-by-a-score-threshold/5502/1 "2011-10-03T13:51:12Z")

</div>

From what i've read ([http://wiki.apache.org/lucene-java/](http://wiki.apache.org/lucene-java/)  
LuceneFAQ#Can\_I\_filter\_by\_score.3F) filtering by score is not a good  
idea in lucene.

I was wondering if there are any other options other than the  
min\_score filter in Elastic that would make doing something like this  
more viable. I'm thinking along the lines of using scripting with the  
doc score and max score, but im not sure if this is possible?

---

<div class="post-metadata">

**Author:** ![kimchy](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/kimchy/32/44952_2.png) [@kimchy](https://discuss.elastic.co/u/kimchy)\
**Post date:** [October 3, 2011, 9:01pm UTC](https://discuss.elastic.co/t/filter-by-a-score-threshold/5502/2 "2011-10-03T21:01:24Z")

</div>

Even if you use scripting, if you base your calc on the lucene score, you  
will face the same problems, no way around it...

On Mon, Oct 3, 2011 at 3:51 PM, frazer [frazer.horn@gmail.com](mailto:frazer.horn@gmail.com) wrote:

> From what i've read ([Home - Apache Lucene (Java) - Apache Software Foundation](http://wiki.apache.org/lucene-java/)  
> LuceneFAQ#Can\_I\_filter\_by\_score.3F) filtering by score is not a good  
> idea in lucene.
> 
> I was wondering if there are any other options other than the  
> min\_score filter in Elastic that would make doing something like this  
> more viable. I'm thinking along the lines of using scripting with the  
> doc score and max score, but im not sure if this is possible?

---

<div class="post-metadata">

**Author:** ![frazer](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/frazer/32/2752_2.png) [@frazer](https://discuss.elastic.co/u/frazer)\
**Post date:** [October 4, 2011, 4:07am UTC](https://discuss.elastic.co/t/filter-by-a-score-threshold/5502/3 "2011-10-04T04:07:04Z")

</div>

Thanks Shay, just wanted to check there were no other options

On Oct 3, 5:01 pm, Shay Banon [kim...@gmail.com](mailto:kim...@gmail.com) wrote:

> Even if you use scripting, if you base your calc on the lucene score, you  
> will face the same problems, no way around it...
> 
> On Mon, Oct 3, 2011 at 3:51 PM, frazer [frazer.h...@gmail.com](mailto:frazer.h...@gmail.com) wrote:
> 
> > From what i've read ([Home - Apache Lucene (Java) - Apache Software Foundation](http://wiki.apache.org/lucene-java/)  
> > LuceneFAQ#Can\_I\_filter\_by\_score.3F) filtering by score is not a good  
> > idea in lucene.
> 
> > I was wondering if there are any other options other than the  
> > min\_score filter in Elastic that would make doing something like this  
> > more viable. I'm thinking along the lines of using scripting with the  
> > doc score and max score, but im not sure if this is possible?

---

<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, 3:52am UTC](https://discuss.elastic.co/t/filter-by-a-score-threshold/5502/4 "2017-07-06T03:52:55Z")

</div>


