# TotalBuckets in Term Aggregation

**URL:** <https://discuss.elastic.co/t/totalbuckets-in-term-aggregation/50973>\
**Category:** Elasticsearch\
**Created:** [May 25, 2016, 5:13pm UTC](https://discuss.elastic.co/t/totalbuckets-in-term-aggregation/50973 "2016-05-25T17:13:18Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![mooky](https://avatars.discourse-cdn.com/v4/letter/m/43a26b/32.png) [@mooky](https://discuss.elastic.co/u/mooky)\
**Post date:** [May 25, 2016, 5:13pm UTC](https://discuss.elastic.co/t/totalbuckets-in-term-aggregation/50973/1 "2016-05-25T17:13:18Z")

</div>

I am using a Term Aggregation.  
I want to limit how many terms/buckets (because I don't want to display all of them to the user) (so I set the size)  
But I do want to indicate to the user when they are not looking at the full results - ie I want to be able to display "showing 20 of 240 results".

Is there a way of getting the total number of buckets/terms?

---

<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:49pm UTC](https://discuss.elastic.co/t/totalbuckets-in-term-aggregation/50973/2 "2017-07-05T22:49:01Z")

</div>


