# Terms aggregation - from and to

**URL:** <https://discuss.elastic.co/t/terms-aggregation-from-and-to/125330>\
**Category:** Elasticsearch\
**Created:** [March 23, 2018, 9:05am UTC](https://discuss.elastic.co/t/terms-aggregation-from-and-to/125330 "2018-03-23T09:05:46Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Nili](https://avatars.discourse-cdn.com/v4/letter/n/50afbb/32.png) [@Nili](https://discuss.elastic.co/u/Nili)\
**Post date:** [March 23, 2018, 9:05am UTC](https://discuss.elastic.co/t/terms-aggregation-from-and-to/125330/1 "2018-03-23T09:05:46Z")

</div>

Hello,

We need to extract partial number of the result of "Terms" aggregation from a starting point and till an endpoint, lets say - only the 10th till the 20th values.  
We have the "size" parameter, but it there a way to set also the "start"?

I know that we can set in this case size = 20 and in the code take only a subset of the result, but if there is a way to do it in Elasticsearch it will be nicer, because we can have lots of values, and we don't want to get heavy memory in our application.

Thanks!

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [March 23, 2018, 9:28am UTC](https://discuss.elastic.co/t/terms-aggregation-from-and-to/125330/2 "2018-03-23T09:28:11Z")

</div>

I don't think it's possible. Or if it is it will consume anyway a lot of memory on elasticsearch side IMO.

I'm curious about the use case though.  
Is that something you want to display to the users or to process later in another system?

---

<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:** [April 20, 2018, 9:28am UTC](https://discuss.elastic.co/t/terms-aggregation-from-and-to/125330/3 "2018-04-20T09:28:26Z")

</div>

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