# Count nested documents only?

**URL:** <https://discuss.elastic.co/t/count-nested-documents-only/113248>\
**Category:** Elasticsearch\
**Created:** [December 26, 2017, 10:11pm UTC](https://discuss.elastic.co/t/count-nested-documents-only/113248 "2017-12-26T22:11:24Z")\
**Posts on this page:** 1\
**Showing post:** 7

<div class="post-metadata">

**Author:** ![bkazez](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/bkazez/32/25991_2.png) [@bkazez](https://discuss.elastic.co/u/bkazez)\
**Post date:** [December 28, 2017, 8:29pm UTC](https://discuss.elastic.co/t/count-nested-documents-only/113248/7 "2017-12-28T20:29:42Z")

</div>

Ah of course. I did that and now I have the total result count but it doesn't work with "size" for result pagination ([Pagination in aggregation](https://discuss.elastic.co/t/pagination-in-aggregation/79423)). I can add a filter aggregation, but I believe I can't set the size on that filter. I'm an ES beginner, though...hopefully I'm missing something!

---

_[View the full topic](https://discuss.elastic.co/t/count-nested-documents-only/113248)._
