if you application goes OOM, then possibly the aggregation result is too big? Can you reduce the result by returning less buckets? If the aggregation contains the data you need, you are going to need more heap I guess. Another possibility is, that you have many requests in parallel with big aggs, so trying to reduce the amount of parallel requests (or the aggs size response) might help.
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.