# Result Score descending by exact match

**URL:** <https://discuss.elastic.co/t/result-score-descending-by-exact-match/10583>\
**Category:** Elasticsearch\
**Created:** [February 1, 2013, 9:44am UTC](https://discuss.elastic.co/t/result-score-descending-by-exact-match/10583 "2013-02-01T09:44:14Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Philipp\_Frenzel](https://avatars.discourse-cdn.com/v4/letter/p/bcef8e/32.png) [@Philipp\_Frenzel](https://discuss.elastic.co/u/Philipp_Frenzel)\
**Post date:** [February 1, 2013, 9:44am UTC](https://discuss.elastic.co/t/result-score-descending-by-exact-match/10583/1 "2013-02-01T09:44:14Z")

</div>

Hi,

the question is, that having absolute same records in elastic search  
engine, we send a query with a 100% match on the index field. But viewing  
the score, it's  
descending slowly in different steps: 1,3,5 times the same grouped score...

Is this a feature or a bug?

1 Token 10 times the same content, 3 scores as described above...

Thank you for your support!

Regards Phil

--  
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:** [February 1, 2013, 10:37am UTC](https://discuss.elastic.co/t/result-score-descending-by-exact-match/10583/2 "2013-02-01T10:37:07Z")

</div>

Hiya

On Fri, 2013-02-01 at 01:44 -0800, Philipp Frenzel wrote:

> Hi,
> 
> the question is, that having absolute same records in Elasticsearch  
> engine, we send a query with a 100% match on the index field. But  
> viewing the score, it's  
> descending slowly in different steps: 1,3,5 times the same grouped  
> score...

You haven't provided any example code, so I'm guessing about what you're  
doing. But it is likely that you are running into the distributed  
nature of ES.

Term frequencies are stored per shard. By default, you have 5 shards,  
each with their own term frequencies (which will thus produce different  
scores).

With more data, the distribution tends to even out, but with small  
amounts of data, or rarely used terms, there can be differences.

Try adding this to your query string: search\_type=dfs\_query\_then\_fetch

That calculates the terms across all shards before running the query

clint

--  
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:** ![Philipp\_Frenzel\_2](https://avatars.discourse-cdn.com/v4/letter/p/ce73a5/32.png) [@Philipp\_Frenzel\_2](https://discuss.elastic.co/u/Philipp_Frenzel_2)\
**Post date:** [February 13, 2013, 6:27am UTC](https://discuss.elastic.co/t/result-score-descending-by-exact-match/10583/3 "2013-02-13T06:27:34Z")

</div>

I think this solved it - thanks!

search\_type=dfs\_query\_then\_  
fetch

2013/2/1 Clinton Gormley [clint@traveljury.com](mailto:clint@traveljury.com)

> Hiya
> 
> On Fri, 2013-02-01 at 01:44 -0800, Philipp Frenzel wrote:
> 
> > Hi,
> > 
> > the question is, that having absolute same records in Elasticsearch  
> > engine, we send a query with a 100% match on the index field. But  
> > viewing the score, it's  
> > descending slowly in different steps: 1,3,5 times the same grouped  
> > score...
> 
> You haven't provided any example code, so I'm guessing about what you're  
> doing. But it is likely that you are running into the distributed  
> nature of ES.
> 
> Term frequencies are stored per shard. By default, you have 5 shards,  
> each with their own term frequencies (which will thus produce different  
> scores).
> 
> With more data, the distribution tends to even out, but with small  
> amounts of data, or rarely used terms, there can be differences.
> 
> Try adding this to your query string: search\_type=dfs\_query\_then\_fetch
> 
> That calculates the terms across all shards before running the query
> 
> clint
> 
> --  
> 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).

--  
Mit freundlichen Grüßen

Philipp Frenzel

Vertriebsbeauftragter  
Wilken GmbH

--  
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:51am UTC](https://discuss.elastic.co/t/result-score-descending-by-exact-match/10583/4 "2017-07-06T02:51:44Z")

</div>


