"dfs_query_then_fetch" and "query_then_fetch" return the same score

(Hubo3085632) #1

i known the difference between "dfs_query_then_fetch" and "query_then_fetch",I think this will return different idf ,but it return the same idf and same score,why is it?

(David Pilato) #2

I guess it can happen:

  • with 1 shard for the day index
  • when hitting 1 shard (routing)
  • with "luck"
  • on a sample index with only one document

Anyway, may be paste your queries and the result?
explain option might tell you as well.

(Hubo3085632) #3

thanks a lot ,i find all docs which has the term is on the same shard

(Hubo3085632) #4

but why does "maxDocs" in explain is same? i used different search type, there are 4 shards total 1246 docs,when search with query_then_fetch the "maxDocs" is 465,but search with dfs_query_then_fetch the "maxDocs" is also 465, why not is 1246?

(David Pilato) #5

I don't know with a complete example but what is actually the problem you want to solve?

(Hubo3085632) #6

I am preparing data for training Elasticsearch to my colleague, i need present the similarity algorithms,so i need a case to introducing TF/IDF ,when i use this "idf(t) = 1 + log ( numDocs / (docFreq + 1))" function i was confused about "numDocs" and "maxDocs"

(system) #7

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.