Help me understand the explanation of query result

(Xudong You) #1

I got following result with "explain":true

value: 0.57545155
description: "weight(Description:univers in 2680) [PerFieldSimilarity], result of:"

value: 0.57545155
description: "score(doc=2680,freq=1.0), product of:"

what does doc=2680 mean? does it mean there are totally 2680 documents mach the query term "univers" in Description field?

But for another index and query I got following result:
"description": "weight(Description:university in 0) [PerFieldSimilarity], result of:",
"description": "score(doc=0,freq=1.0), product of:",

So if the number in doc=xxx mean document count, how to explain the doc=0 in second explanation result?

(Mark Harwood) #2

It's not a count but a low-level document ID internal to Lucene [1].
While elasticsearch subdivides content into shards each shard is a Lucene index which is further subdivided into segments. This ID is a document within a segment and so there can be many "doc=0" references from the same shard even.


(system) #3