# How to show only aggregation of aggregations

**URL:** <https://discuss.elastic.co/t/how-to-show-only-aggregation-of-aggregations/58048>\
**Category:** Elasticsearch\
**Created:** [August 15, 2016, 5:45pm UTC](https://discuss.elastic.co/t/how-to-show-only-aggregation-of-aggregations/58048 "2016-08-15T17:45:19Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Markus\_Paaso](https://avatars.discourse-cdn.com/v4/letter/m/a88e4f/32.png) [@Markus\_Paaso](https://discuss.elastic.co/u/Markus_Paaso)\
**Post date:** [August 15, 2016, 5:45pm UTC](https://discuss.elastic.co/t/how-to-show-only-aggregation-of-aggregations/58048/1 "2016-08-15T17:45:19Z")

</div>

Hi!

I have 100M item-timestamp pairs for 10M items in index and I would like to find percentiles of item lifetimes.  
With aggregation I get 10M buckets and using **percentiles\_bucket** I can aggregate buckets into few percentiles.  
The problem is that ES outputs few hundred Mbytes of buckets and finally the wanted percentiles at the end of the output. How can I reduce the output just to precentiles? I don't need the 10M mid-buckets but only the final result of precentiles.

Please see [http://pastebin.com/hCJ9xLir](http://pastebin.com/hCJ9xLir)

Regards, Markus Paaso

---

<div class="post-metadata">

**Author:** ![ywelsch](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ywelsch/32/7751_2.png) [@ywelsch](https://discuss.elastic.co/u/ywelsch)\
**Post date:** [August 16, 2016, 2:04pm UTC](https://discuss.elastic.co/t/how-to-show-only-aggregation-of-aggregations/58048/2 "2016-08-16T14:04:14Z")

</div>

you can use response filtering for that:

[https://www.elastic.co/guide/en/elasticsearch/reference/current/common-options.html#\_response\_filtering](https://www.elastic.co/guide/en/elasticsearch/reference/current/common-options.html#_response_filtering)

---

<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:27pm UTC](https://discuss.elastic.co/t/how-to-show-only-aggregation-of-aggregations/58048/3 "2017-07-05T22:27:33Z")

</div>


