# Different number of documents Elasticsearch vs Kibana

**URL:** <https://discuss.elastic.co/t/different-number-of-documents-elasticsearch-vs-kibana/58328>\
**Category:** Elasticsearch\
**Created:** [August 18, 2016, 8:27am UTC](https://discuss.elastic.co/t/different-number-of-documents-elasticsearch-vs-kibana/58328 "2016-08-18T08:27:19Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Guillermo\_Ortiz](https://avatars.discourse-cdn.com/v4/letter/g/258eb7/32.png) [@Guillermo\_Ortiz](https://discuss.elastic.co/u/Guillermo_Ortiz)\
**Post date:** [August 18, 2016, 8:27am UTC](https://discuss.elastic.co/t/different-number-of-documents-elasticsearch-vs-kibana/58328/1 "2016-08-18T08:27:19Z")

</div>

I have an index and the number of documents when I execute the query [http://localhost:9200/\_cat/indices?v](http://localhost:9200/_cat/indices?v) is different that when I do the complete search for my indices with Kibana.

How is that possible?

---

<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:** [August 19, 2016, 10:13am UTC](https://discuss.elastic.co/t/different-number-of-documents-elasticsearch-vs-kibana/58328/2 "2016-08-19T10:13:39Z")

</div>

Could it be because of the index pattern that is set up in Kibana?

---

<div class="post-metadata">

**Author:** ![thn](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/thn/32/8061_2.png) [@thn](https://discuss.elastic.co/u/thn)\
**Post date:** [August 19, 2016, 12:29pm UTC](https://discuss.elastic.co/t/different-number-of-documents-elasticsearch-vs-kibana/58328/3 "2016-08-19T12:29:39Z")

</div>

I think -cat/indices?v gives you the number of documents plus sub-documents (if there is any) indexed. To get the correct count I think you change the URL to the index of interest then use \_count to get the correct number of documents in the index. You can take a look at the document below but don't add the "query portion"

[https://www.elastic.co/guide/en/elasticsearch/reference/2.0/search-count.html](https://www.elastic.co/guide/en/elasticsearch/reference/2.0/search-count.html)

---

<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, 10:26pm UTC](https://discuss.elastic.co/t/different-number-of-documents-elasticsearch-vs-kibana/58328/4 "2017-07-05T22:26:38Z")

</div>


