# How to get counts of root level (parent) documents for indices?

**URL:** <https://discuss.elastic.co/t/how-to-get-counts-of-root-level-parent-documents-for-indices/154258>\
**Category:** Elasticsearch\
**Created:** [October 26, 2018, 9:53pm UTC](https://discuss.elastic.co/t/how-to-get-counts-of-root-level-parent-documents-for-indices/154258 "2018-10-26T21:53:14Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Teddis](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/teddis/32/27902_2.png) [@Teddis](https://discuss.elastic.co/u/Teddis)\
**Post date:** [October 26, 2018, 9:53pm UTC](https://discuss.elastic.co/t/how-to-get-counts-of-root-level-parent-documents-for-indices/154258/1 "2018-10-26T21:53:14Z")

</div>

I'm presently using this to get a high-level snapshot of index counts:

GET /\_cat/indices?v&s=docs.count:desc

But it's displaying all documents included nested documents. I can't find any documentation on whether possible to also (or just) display the count of parent documents per index. For example, I have a store index:

```
health status index uuid pri rep docs.count docs.deleted store.size pri.store.size
yellow open store_20181024_082902 TFiAcSJEQkey5maZ1KTGWA 5 1 5825 215 1.1mb 1.1mb

```

But there are only something like 1184 store documents in this index. I suppose it's also possible to do a search for all records without enabling \_source, but this only applies to a single index.

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:** [November 23, 2018, 9:53pm UTC](https://discuss.elastic.co/t/how-to-get-counts-of-root-level-parent-documents-for-indices/154258/2 "2018-11-23T21:53:21Z")

</div>

Closed on November 23, 2018, 9:53pm UTC

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