# How do I get a list of the highest frequency(top list) in each field in the elasticsearch?

**URL:** <https://discuss.elastic.co/t/how-do-i-get-a-list-of-the-highest-frequency-top-list-in-each-field-in-the-elasticsearch/86702>\
**Category:** Elasticsearch\
**Created:** [May 22, 2017, 4:00pm UTC](https://discuss.elastic.co/t/how-do-i-get-a-list-of-the-highest-frequency-top-list-in-each-field-in-the-elasticsearch/86702 "2017-05-22T16:00:01Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Gurram\_Vinay](https://avatars.discourse-cdn.com/v4/letter/g/85e7bf/32.png) [@Gurram\_Vinay](https://discuss.elastic.co/u/Gurram_Vinay)\
**Post date:** [May 22, 2017, 4:00pm UTC](https://discuss.elastic.co/t/how-do-i-get-a-list-of-the-highest-frequency-top-list-in-each-field-in-the-elasticsearch/86702/1 "2017-05-22T16:00:01Z")

</div>

Example: I have fields of data contains Departure station, gender, age, Destination etc..

1. I just want to find the top list of "Destinations" along with same "Departure station"

2. Top list of individial Destination, gender and Destination

Example: below code, I was able to get the only top list of "Departure" only. I wanted to get the top list of from "Departure" to "Destination" with same "gender" and "age" count?

#code:

{  
"size":0,  
"aggs":{  
"top-terms-aggregation":{  
"terms":{  
"field":"Departure",  
"size":10  
}  
}  
}  
}

-Thanks advance

---

<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:** [June 19, 2017, 4:00pm UTC](https://discuss.elastic.co/t/how-do-i-get-a-list-of-the-highest-frequency-top-list-in-each-field-in-the-elasticsearch/86702/2 "2017-06-19T16:00:27Z")

</div>

Closed on June 19, 2017, 4:00pm UTC

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
