# How to predict the top match or higher score is exact match?

**URL:** https://discuss.elastic.co/t/how-to-predict-the-top-match-or-higher-score-is-exact-match/9148
**Category:** Elasticsearch
**Created:** [September 26, 2012, 7:10am UTC](https://discuss.elastic.co/t/how-to-predict-the-top-match-or-higher-score-is-exact-match/9148 "2012-09-26T07:10:05Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![Sam\_4](https://avatars.discourse-cdn.com/v4/letter/s/db5fbb/32.png) [@Sam\_4](https://discuss.elastic.co/u/Sam_4)
#### Post date: [September 26, 2012, 7:10am UTC](https://discuss.elastic.co/t/how-to-predict-the-top-match-or-higher-score-is-exact-match/9148/1 "2012-09-26T07:10:05Z")

</div>

Hi

How can I predict the top one match is most exact match in elastic search.

Thanks

--

---

<div class="post-metadata">

### Author: ![Derry\_O\_Sullivan](https://avatars.discourse-cdn.com/v4/letter/d/7bcc69/32.png) [@Derry\_O\_Sullivan](https://discuss.elastic.co/u/Derry_O_Sullivan)
#### Post date: [September 26, 2012, 7:36am UTC](https://discuss.elastic.co/t/how-to-predict-the-top-match-or-higher-score-is-exact-match/9148/2 "2012-09-26T07:36:16Z")

</div>

Hi Sam,

Can you be a bit more specific about your question? ES returns the results  
in sorted score order by default (print out the scores to verify). Matching  
is based on your query so you decide what the most exact match is in your  
query.

On Wednesday, 26 September 2012 08:10:05 UTC+1, sam wrote:

> Hi
> 
> How can I predict the top one match is most exact match in Elasticsearch.
> 
> Thanks

--

---

<div class="post-metadata">

### Author: ![Sam\_4](https://avatars.discourse-cdn.com/v4/letter/s/db5fbb/32.png) [@Sam\_4](https://discuss.elastic.co/u/Sam_4)
#### Post date: [September 26, 2012, 7:59am UTC](https://discuss.elastic.co/t/how-to-predict-the-top-match-or-higher-score-is-exact-match/9148/3 "2012-09-26T07:59:18Z")

</div>

yes,score is sorted order,but some times i got score on less than 1 and  
some times greater than one.for example- if i am searching on all  
fields(\_all) i got less score when i search on specific field i got greater  
score.what i think that fields is also play important role to get score.

I am working on project where is want to set 2- parameters( _system matched  
exact match,go for manual match_) .  
for deciding two parameters i need to set cutoff which will be based on  
score, so score play vital role.if score is not consistent then i did not  
decide any cutoff.if you suggest any other option to solve my problem than  
I am very pleasure for this.

_The logic :_

suppose my cuff off is set 3,then between 30% of cutoff will mark as go for  
manual match and above or equal the cutoff will say that exact match.

Thanks

On Wednesday, September 26, 2012 12:40:05 PM UTC+5:30, sam wrote:

> Hi
> 
> How can I predict the top one match is most exact match in Elasticsearch.
> 
> Thanks

--

---

<div class="post-metadata">

### Author: ![Ivan](https://avatars.discourse-cdn.com/v4/letter/i/df788c/32.png) [@Ivan](https://discuss.elastic.co/u/Ivan)
#### Post date: [September 26, 2012, 7:57pm UTC](https://discuss.elastic.co/t/how-to-predict-the-top-match-or-higher-score-is-exact-match/9148/4 "2012-09-26T19:57:40Z")

</div>

Lucene discourages thinking in terms of exact match:

[http://wiki.apache.org/lucene-java/ScoresAsPercentages](http://wiki.apache.org/lucene-java/ScoresAsPercentages)

\*People frequently want to compute a "Percentage" from Lucene scores to  
determine what is a "100% perfect" match vs a "50%" match. This is also  
somethings called a "normalized score"

Don't do this.

Seriously. Stop trying to think about your problem this way, it's not going  
to end well.\*

See also  
[http://wiki.apache.org/lucene-java/LuceneFAQ#Can\_I\_filter\_by\_score.3F](http://wiki.apache.org/lucene-java/LuceneFAQ#Can_I_filter_by_score.3F)

--  
Ivan

On Wed, Sep 26, 2012 at 12:59 AM, sam [mishra.sameek@gmail.com](mailto:mishra.sameek@gmail.com) wrote:

> yes,score is sorted order,but some times i got score on less than 1 and  
> some  
> times greater than one.for example- if i am searching on all fields(\_all)  
> i  
> got less score when i search on specific field i got greater score.what i  
> think that fields is also play important role to get score.
> 
> I am working on project where is want to set 2- parameters( system matched  
> exact match,go for manual match) .  
> for deciding two parameters i need to set cutoff which will be based on  
> score, so score play vital role.if score is not consistent then i did not  
> decide any cutoff.if you suggest any other option to solve my problem  
> than I  
> am very pleasure for this.
> 
> The logic :
> 
> suppose my cuff off is set 3,then between 30% of cutoff will mark as go  
> for  
> manual match and above or equal the cutoff will say that exact match.
> 
> Thanks
> 
> On Wednesday, September 26, 2012 12:40:05 PM UTC+5:30, sam wrote:
> 
> > Hi
> > 
> > How can I predict the top one match is most exact match in elastic  
> > search.
> > 
> > Thanks
> 
> --

--

---

<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:11am UTC](https://discuss.elastic.co/t/how-to-predict-the-top-match-or-higher-score-is-exact-match/9148/5 "2017-07-06T03:11:15Z")

</div>


