# Elastic Search Group by a single column - Term Aggregation - TrackTotalHits

**URL:** <https://discuss.elastic.co/t/elastic-search-group-by-a-single-column-term-aggregation-tracktotalhits/239361>\
**Category:** Elasticsearch\
**Created:** [June 30, 2020, 6:31pm UTC](https://discuss.elastic.co/t/elastic-search-group-by-a-single-column-term-aggregation-tracktotalhits/239361 "2020-06-30T18:31:46Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Naveena1](https://avatars.discourse-cdn.com/v4/letter/n/a4c791/32.png) [@Naveena1](https://discuss.elastic.co/u/Naveena1)\
**Post date:** [June 30, 2020, 6:31pm UTC](https://discuss.elastic.co/t/elastic-search-group-by-a-single-column-term-aggregation-tracktotalhits/239361/1 "2020-06-30T18:31:46Z")

</div>

Can someone please help me on the below requirement ?

I am able to group by single field using Term aggregation but  
I always end up with fetching top 10 buckets since size defaults to 10.

1. Is there a way where I can get total distinct groups available  
and get just 10 as per the default size ? [ Total distinct groups might be  
sometimes 1lakh - I have a requirement where I will have to  
display total distinct groups available]

2. Can I perform Term Aggregations on numeric fields as well similar  
to string fields in ES ?

---

<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 28, 2020, 6:31pm UTC](https://discuss.elastic.co/t/elastic-search-group-by-a-single-column-term-aggregation-tracktotalhits/239361/2 "2020-07-28T18:31:50Z")

</div>

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