# Exclude results with a score X percent away from top score

**URL:** https://discuss.elastic.co/t/exclude-results-with-a-score-x-percent-away-from-top-score/10960
**Category:** Elasticsearch
**Created:** [February 28, 2013, 11:06pm UTC](https://discuss.elastic.co/t/exclude-results-with-a-score-x-percent-away-from-top-score/10960 "2013-02-28T23:06:23Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![William\_King](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/william_king/32/2631_2.png) [@William\_King](https://discuss.elastic.co/u/William_King)
#### Post date: [February 28, 2013, 11:06pm UTC](https://discuss.elastic.co/t/exclude-results-with-a-score-x-percent-away-from-top-score/10960/1 "2013-02-28T23:06:23Z")

</div>

Hi all,

When doing full text searches in my dataset the first few results are  
usually pretty accurate. However after that there are many junk results.

For example if I do a search for "rob hill campground" my top result is  
spot on and has a score of around 5. However after that there are many  
results with scores of around 0.6 that, for example, just include the word  
"rob".

Is it possible to leave these results out of the result set somehow? I was  
thinking something like if a result is 70% different from the highest  
score, exclude it from the result set.

I'm currently using a multi field "query\_string" query.

Thanks

--  
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: ![simonw\_2](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/simonw_2/32/1130_2.png) [@simonw\_2](https://discuss.elastic.co/u/simonw_2)
#### Post date: [March 1, 2013, 10:27am UTC](https://discuss.elastic.co/t/exclude-results-with-a-score-x-percent-away-from-top-score/10960/2 "2013-03-01T10:27:51Z")

</div>

Hey William,

I can see why you want to do this, is there anything keeping you from doing  
the calculation yourself in the client?

simon

On Friday, March 1, 2013 12:06:23 AM UTC+1, William King wrote:

> Hi all,
> 
> When doing full text searches in my dataset the first few results are  
> usually pretty accurate. However after that there are many junk results.
> 
> For example if I do a search for "rob hill campground" my top result is  
> spot on and has a score of around 5. However after that there are many  
> results with scores of around 0.6 that, for example, just include the word  
> "rob".
> 
> Is it possible to leave these results out of the result set somehow? I was  
> thinking something like if a result is 70% different from the highest  
> score, exclude it from the result set.
> 
> I'm currently using a multi field "query\_string" query.
> 
> Thanks

--  
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:48am UTC](https://discuss.elastic.co/t/exclude-results-with-a-score-x-percent-away-from-top-score/10960/3 "2017-07-06T02:48:53Z")

</div>


