# Different values for index doc's count in kibana sense?

**URL:** <https://discuss.elastic.co/t/different-values-for-index-docs-count-in-kibana-sense/91278>\
**Category:** Elasticsearch\
**Created:** [June 29, 2017, 12:20pm UTC](https://discuss.elastic.co/t/different-values-for-index-docs-count-in-kibana-sense/91278 "2017-06-29T12:20:11Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Yaswanth](https://avatars.discourse-cdn.com/v4/letter/y/94ad74/32.png) [@Yaswanth](https://discuss.elastic.co/u/Yaswanth)\
**Post date:** [June 29, 2017, 12:20pm UTC](https://discuss.elastic.co/t/different-values-for-index-docs-count-in-kibana-sense/91278/1 "2017-06-29T12:20:11Z")

</div>

Hi,

Guys when i had given `GET _cat/indices ?v` in kibana sense i am getting the doc's count for an index is like this

```
health status index pri rep docs.count docs.deleted store.size pri.store.size 
green open content 5 1 1057134 138780 6.4gb 3.2gb 

```

But when i went inside the index using `GET content/_search` i am getting total as 333771 which is completely different . I dont know why i am getting this ?

Note: I am not getting this problem with all the indices in my ES cluster but for some i am getting this mismatch docs.count problem

Thanks

---

<div class="post-metadata">

**Author:** ![Yaswanth](https://avatars.discourse-cdn.com/v4/letter/y/94ad74/32.png) [@Yaswanth](https://discuss.elastic.co/u/Yaswanth)\
**Post date:** [July 5, 2017, 8:34am UTC](https://discuss.elastic.co/t/different-values-for-index-docs-count-in-kibana-sense/91278/2 "2017-07-05T08:34:25Z")

</div>

Answering my question

The docs.count that i am seeing in kibana is the count of all doc's in primaries. And the `GET index/_search` is counting the total doc's as per unique doc ID's

Correct me if i am wrong ..

Thanks

---

<div class="post-metadata">

**Author:** ![jpountz](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jpountz/32/45836_2.png) [@jpountz](https://discuss.elastic.co/u/jpountz)\
**Post date:** [July 5, 2017, 1:58pm UTC](https://discuss.elastic.co/t/different-values-for-index-docs-count-in-kibana-sense/91278/3 "2017-07-05T13:58:39Z")

</div>

The doc count is summed up among all shards, including replicas. Since you have one replica per primary shard, this can inflate the doc count. Also note that there might also be a discrepancy in the case that you have `nested` mappings, which create implicity documents.

---

<div class="post-metadata">

**Author:** ![Yaswanth](https://avatars.discourse-cdn.com/v4/letter/y/94ad74/32.png) [@Yaswanth](https://discuss.elastic.co/u/Yaswanth)\
**Post date:** [July 5, 2017, 2:55pm UTC](https://discuss.elastic.co/t/different-values-for-index-docs-count-in-kibana-sense/91278/4 "2017-07-05T14:55:10Z")

</div>

Thanks @jpountz[quote="jpountz, post:3, topic:91278"]  
Also note that there might also be a discrepancy in the case that you have nested mappings, which create implicity documents  
[/quote]

Whether this discrepancy will be in `GET _cat/indices` api or it will be in `GET index/_search` api . Because if this in the `GET index/_search` then we can miss the exact doc's present right?

Thanks

---

<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:** [August 2, 2017, 2:55pm UTC](https://discuss.elastic.co/t/different-values-for-index-docs-count-in-kibana-sense/91278/5 "2017-08-02T14:55:13Z")

</div>

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