# Scroll aggregations

**URL:** https://discuss.elastic.co/t/scroll-aggregations/17808
**Category:** Elasticsearch
**Created:** [May 29, 2014, 2:13pm UTC](https://discuss.elastic.co/t/scroll-aggregations/17808 "2014-05-29T14:13:56Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![Deepjot\_Singh](https://avatars.discourse-cdn.com/v4/letter/d/838e76/32.png) [@Deepjot\_Singh](https://discuss.elastic.co/u/Deepjot_Singh)
#### Post date: [May 29, 2014, 2:13pm UTC](https://discuss.elastic.co/t/scroll-aggregations/17808/1 "2014-05-29T14:13:56Z")

</div>

hello friends,  
I have an index with some 10m records.  
When I try to find distincts in one field (around 2m) my Java runs out of  
memory.  
Can I implement a scan and scroll on this aggregation to retrieve the same  
data in smaller parts.

Thanks

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/e0c92441-d1e7-44bc-bf47-940279553ebd%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/e0c92441-d1e7-44bc-bf47-940279553ebd%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

### Author: ![ElasticSearch\_Users\_](https://avatars.discourse-cdn.com/v4/letter/e/b4bc9f/32.png) [@ElasticSearch\_Users\_](https://discuss.elastic.co/u/ElasticSearch_Users_)
#### Post date: [May 30, 2014, 9:40pm UTC](https://discuss.elastic.co/t/scroll-aggregations/17808/2 "2014-05-30T21:40:05Z")

</div>

Unfortunately not at the moment. However, you could look into spreading the  
data around with more shards/nodes (thus lesser memory requirements per  
node), or add more RAM, or possibly use disk-based fielddata:

> **[Disk-Based Field Data a.k.a. Doc Values
	  	 | Elastic](https://www.elastic.co/blog/disk-based-field-data-a-k-a-doc-values)**
>
> Elasticsearch is not just about full-text search, and many users are actually not using Elasticsearch for full-text search at all but for analytics though facets. This approach works well, but, as you...

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/02c68090-93d9-4175-8396-1dd8ab22c730%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/02c68090-93d9-4175-8396-1dd8ab22c730%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<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 6, 2017, 1:25am UTC](https://discuss.elastic.co/t/scroll-aggregations/17808/3 "2017-07-06T01:25:36Z")

</div>


