# Score and relevance across the shards

**URL:** <https://discuss.elastic.co/t/score-and-relevance-across-the-shards/5371>\
**Category:** Elasticsearch\
**Created:** [September 13, 2011, 1:14pm UTC](https://discuss.elastic.co/t/score-and-relevance-across-the-shards/5371 "2011-09-13T13:14:46Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![konstantin](https://avatars.discourse-cdn.com/v4/letter/k/858c86/32.png) [@konstantin](https://discuss.elastic.co/u/konstantin)\
**Post date:** [September 13, 2011, 1:14pm UTC](https://discuss.elastic.co/t/score-and-relevance-across-the-shards/5371/1 "2011-09-13T13:14:46Z")

</div>

Hi guys,

I need help to clarify how the ES merge scores across different  
shards. As I know each shard is a Lucene index instance. Thus each  
index has its own tf-idf normalization that is independent from other  
shards. So, here is the first question. Are the score depends on how  
data distributed across the shards? Second, are the rank of documents  
depends on how data distributed across the shards?Third, what is the  
algorithm for merging scores across the shards?

Sorry if my questions are vague. Just ask me and I'll clarify the  
points.  
Thanks!

---

<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:** [September 13, 2011, 9:00pm UTC](https://discuss.elastic.co/t/score-and-relevance-across-the-shards/5371/2 "2011-09-13T21:00:17Z")

</div>

Hey, by default, the scores are used as is from each shard, and sorted by  
it. So, the scores will use the tf-idf as it is defined on each shard, which  
means it will depend on how data is distributed.

If you want, you can set the search type to have a DFS phase that would go  
and do aggregated frequencies, but that will mean slower search. See here:  
[Elasticsearch Platform — Find real-time answers at scale | Elastic](http://www.elasticsearch.org/guide/reference/api/search/search-type.html).

On Tue, Sep 13, 2011 at 4:14 PM, konstantin  
[konstantin.selivanov@gmail.com](mailto:konstantin.selivanov@gmail.com)wrote:

> Hi guys,
> 
> I need help to clarify how the ES merge scores across different  
> shards. As I know each shard is a Lucene index instance. Thus each  
> index has its own tf-idf normalization that is independent from other  
> shards. So, here is the first question. Are the score depends on how  
> data distributed across the shards? Second, are the rank of documents  
> depends on how data distributed across the shards?Third, what is the  
> algorithm for merging scores across the shards?
> 
> Sorry if my questions are vague. Just ask me and I'll clarify the  
> points.  
> 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:54am UTC](https://discuss.elastic.co/t/score-and-relevance-across-the-shards/5371/3 "2017-07-06T03:54:29Z")

</div>


