# ElasticSearch Aggregation Result In Asending Order of any Field Value (Instead of aggregation field count order)

**URL:** <https://discuss.elastic.co/t/elasticsearch-aggregation-result-in-asending-order-of-any-field-value-instead-of-aggregation-field-count-order/21309>\
**Category:** Elasticsearch\
**Created:** [December 18, 2014, 7:57am UTC](https://discuss.elastic.co/t/elasticsearch-aggregation-result-in-asending-order-of-any-field-value-instead-of-aggregation-field-count-order/21309 "2014-12-18T07:57:31Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![gopal\_m](https://avatars.discourse-cdn.com/v4/letter/g/ed655f/32.png) [@gopal\_m](https://discuss.elastic.co/u/gopal_m)\
**Post date:** [December 18, 2014, 7:57am UTC](https://discuss.elastic.co/t/elasticsearch-aggregation-result-in-asending-order-of-any-field-value-instead-of-aggregation-field-count-order/21309/1 "2014-12-18T07:57:31Z")

</div>

I need to get the list of Field values from the aggreation query. The  
result is always sorted based on the count. But I want that to be the order  
of some other Field value. How to get it.

--  
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/cf6975bd-25a9-4938-abd8-a23467725a48%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/cf6975bd-25a9-4938-abd8-a23467725a48%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:42am UTC](https://discuss.elastic.co/t/elasticsearch-aggregation-result-in-asending-order-of-any-field-value-instead-of-aggregation-field-count-order/21309/2 "2017-07-06T00:42:58Z")

</div>


