# Need some insight on how distributed scoring works in elasticsearch

**URL:** <https://discuss.elastic.co/t/need-some-insight-on-how-distributed-scoring-works-in-elasticsearch/8567>\
**Category:** Elasticsearch\
**Created:** [July 30, 2012, 6:14pm UTC](https://discuss.elastic.co/t/need-some-insight-on-how-distributed-scoring-works-in-elasticsearch/8567 "2012-07-30T18:14:58Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![ajasuja18](https://avatars.discourse-cdn.com/v4/letter/a/45deac/32.png) [@ajasuja18](https://discuss.elastic.co/u/ajasuja18)\
**Post date:** [July 30, 2012, 6:14pm UTC](https://discuss.elastic.co/t/need-some-insight-on-how-distributed-scoring-works-in-elasticsearch/8567/1 "2012-07-30T18:14:58Z")

</div>

Hey Everyone,

In elasticsearch, as we know, while querying we can give various aspects of  
querying.  
One category is Query\_and\_fetch v/s Query\_then\_fetch.  
Also one more add on we can provide is the dfs query with both of them.

I heard one of the vedio of Shay Banon explaining dfs query and he  
mentioned that  
in case of dfs, there is an additional phase in which frequencies from all  
the shards  
is gathered.

\*I am not sure what he means by frequencies. Is it just the distributed  
term frequencies \*  
\*or it also takes into account the distributed inverse document frequencies?  
\*

Thanks in advance.

---

<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:** [July 31, 2012, 7:56am UTC](https://discuss.elastic.co/t/need-some-insight-on-how-distributed-scoring-works-in-elasticsearch/8567/2 "2012-07-31T07:56:38Z")

</div>

On Monday, July 30, 2012 8:14:58 PM UTC+2, ajasuja wrote:

> Hey Everyone,
> 
> In elasticsearch, as we know, while querying we can give various aspects  
> of querying.  
> One category is Query\_and\_fetch v/s Query\_then\_fetch.  
> Also one more add on we can provide is the dfs query with both of them.
> 
> I heard one of the vedio of Shay Banon explaining dfs query and he  
> mentioned that  
> in case of dfs, there is an additional phase in which frequencies from all  
> the shards  
> is gathered.
> 
> \*I am not sure what he means by frequencies. Is it just the distributed  
> term frequencies \*  
> _or it also takes into account the distributed inverse document  
> frequencies?_

in the DFS phase ES will collect a global view of the query terms to  
calculate a global & consistent DocumentFrequencies and in turn  
InverseDocumentFrequencies. It will not collect the TermFrequency (#  
of occurrences in _a_ Document)

simon

> Thanks in advance.

---

<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:18am UTC](https://discuss.elastic.co/t/need-some-insight-on-how-distributed-scoring-works-in-elasticsearch/8567/3 "2017-07-06T03:18:21Z")

</div>


