# Terms aggregation order by percentile

**URL:** <https://discuss.elastic.co/t/terms-aggregation-order-by-percentile/21143>\
**Category:** Elasticsearch\
**Created:** [December 8, 2014, 12:24pm UTC](https://discuss.elastic.co/t/terms-aggregation-order-by-percentile/21143 "2014-12-08T12:24:36Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Valentin\_Pletzer](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/valentin_pletzer/32/105548_2.png) [@Valentin\_Pletzer](https://discuss.elastic.co/u/Valentin_Pletzer)\
**Post date:** [December 8, 2014, 12:24pm UTC](https://discuss.elastic.co/t/terms-aggregation-order-by-percentile/21143/1 "2014-12-08T12:24:36Z")

</div>

Hi,

does anyone know how to order a terms aggregation by a percentile  
sub-aggregation value. I only want to order by one value eg 50

Thanks  
Valentin

--  
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/dc969b6f-166e-4fb7-8ee7-7d3f28948433%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/dc969b6f-166e-4fb7-8ee7-7d3f28948433%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:45am UTC](https://discuss.elastic.co/t/terms-aggregation-order-by-percentile/21143/2 "2017-07-06T00:45:00Z")

</div>


