We want to perform group on src_id and sort on field alias1.Is there any possibility to perform this action.
Please find query below.
"aggs": {
"grp_by_src": {
"terms": {
"field": "src_id",
"order": {
"alias1": "asc"
}
},
"aggs": {
"visitor_count": {
"sum": {
"field": "visitor_count",
"missing": 0
}
}
}
},
"sum_total": {
"sum": {
"field": "visitor_count",
"missing": 0
}
}
}