# Handling vast (milions) number of results in Aggregations

**URL:** <https://discuss.elastic.co/t/handling-vast-milions-number-of-results-in-aggregations/22457>\
**Category:** Elasticsearch\
**Created:** [March 1, 2015, 4:39pm UTC](https://discuss.elastic.co/t/handling-vast-milions-number-of-results-in-aggregations/22457 "2015-03-01T16:39:20Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Sharon\_Abu](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/sharon_abu/32/47792_2.png) [@Sharon\_Abu](https://discuss.elastic.co/u/Sharon_Abu)\
**Post date:** [March 1, 2015, 4:39pm UTC](https://discuss.elastic.co/t/handling-vast-milions-number-of-results-in-aggregations/22457/1 "2015-03-01T16:39:20Z")

</div>

Hello All,

I have a situation where I have an aggregation that counts something and  
groups by per device(mobile), so that means the aggregations results can  
get to 100's or 100,000's or event more of results and thus RAM might not  
be sufficient. I tried to look for a solution which I can tell ES to write  
the results to another index instead of RAM, but could not find any way of  
doing so.  
The concept I'm talking about is similar to MongoDB's $out collection  
([http://docs.mongodb.org/manual/reference/operator/aggregation/out/](http://docs.mongodb.org/manual/reference/operator/aggregation/out/)) in  
map/reduce aggregations.

Appreciate any help on that important matter.

Thanks in advance  
Sharon

--  
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/e83ec7cb-fe4f-441d-9b2d-7dff8a088b04%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/e83ec7cb-fe4f-441d-9b2d-7dff8a088b04%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, 12:29am UTC](https://discuss.elastic.co/t/handling-vast-milions-number-of-results-in-aggregations/22457/2 "2017-07-06T00:29:11Z")

</div>

Closed on July 6, 2017, 12:29am UTC


