# How to scroll aggregation results using Java API

**URL:** https://discuss.elastic.co/t/how-to-scroll-aggregation-results-using-java-api/56836
**Category:** Elasticsearch
**Created:** [July 31, 2016, 6:48pm UTC](https://discuss.elastic.co/t/how-to-scroll-aggregation-results-using-java-api/56836 "2016-07-31T18:48:51Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![Shashi-GS](https://avatars.discourse-cdn.com/v4/letter/s/13edae/32.png) [@Shashi-GS](https://discuss.elastic.co/u/Shashi-GS)
#### Post date: [July 31, 2016, 6:48pm UTC](https://discuss.elastic.co/t/how-to-scroll-aggregation-results-using-java-api/56836/1 "2016-07-31T18:48:51Z")

</div>

Could you please suggest me, Is there any way I can scroll aggregation results from JAVA APIs?

---

<div class="post-metadata">

### Author: ![taras](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/taras/32/507_2.png) [@taras](https://discuss.elastic.co/u/taras)
#### Post date: [August 1, 2016, 1:08am UTC](https://discuss.elastic.co/t/how-to-scroll-aggregation-results-using-java-api/56836/2 "2016-08-01T01:08:03Z")

</div>

There is a concept of _scroll_ for search results, but there is no scrolling for aggregation results.

If you're exposing say top 10 terms on a website, you can run aggregation for top 50 terms, and then if user wishes to load more, either run the same query and render next 20 or implement some application specific cache.

Could you elaborate a little more on what you're trying to do?

---

<div class="post-metadata">

### Author: ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)
#### Post date: [August 2, 2016, 9:57am UTC](https://discuss.elastic.co/t/how-to-scroll-aggregation-results-using-java-api/56836/3 "2016-08-02T09:57:58Z")

</div>

As mentioned, you cannot scroll aggs. There is a feature request for it on GH though.

---

<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:30pm UTC](https://discuss.elastic.co/t/how-to-scroll-aggregation-results-using-java-api/56836/4 "2017-07-05T22:30:55Z")

</div>


