"dfs_query_then_fetch" and "query_then_fetch" return the same score

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?

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.

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

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?

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

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"

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