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

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

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