{
...
"aggs" : {
"city_info" : {
"terms" : { "field" : "city_id" }
}
}
}
As I see, the agg was something like the sql
SELECT city_id, COUNT(*) FROM item GROUP BY city_id;
But what I really wanna was like this
SELECT city_id, city_name, province_name, COUNT(*) FROM item GROUP BY city_id;