# Help me understand the explanation of query result

**URL:** <https://discuss.elastic.co/t/help-me-understand-the-explanation-of-query-result/32764>\
**Category:** Elasticsearch\
**Created:** [October 22, 2015, 10:24am UTC](https://discuss.elastic.co/t/help-me-understand-the-explanation-of-query-result/32764 "2015-10-22T10:24:16Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Youxu](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/youxu/32/117375_2.png) [@Youxu](https://discuss.elastic.co/u/Youxu)\
**Post date:** [October 22, 2015, 10:24am UTC](https://discuss.elastic.co/t/help-me-understand-the-explanation-of-query-result/32764/1 "2015-10-22T10:24:16Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![Mark\_Harwood](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/mark_harwood/32/10538_2.png) [@Mark\_Harwood](https://discuss.elastic.co/u/Mark_Harwood)\
**Post date:** [October 22, 2015, 1:13pm UTC](https://discuss.elastic.co/t/help-me-understand-the-explanation-of-query-result/32764/2 "2015-10-22T13:13:23Z")

</div>

> [@Youxu](#):
>
> So if the number in doc=xxx mean document count, how to explain the doc=0 in second explanation result?

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.

[1] [https://svn.apache.org/repos/asf/lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/search/TermQuery.java](https://svn.apache.org/repos/asf/lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/search/TermQuery.java)

---

<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 5, 2017, 11:43pm UTC](https://discuss.elastic.co/t/help-me-understand-the-explanation-of-query-result/32764/3 "2017-07-05T23:43:17Z")

</div>


