有没有办法对过滤器聚合进行排序?
GET item_*/_search
{
"size": 0,
"query": {
"bool": {
"filter": [
{
"terms": {
"page_id": [
1,
652, ...
]
}
}
]
}
},
"aggs": {
"group1": {
"filter": {
"terms": {
"page_id": [
1,
652,...
]
}
},
"aggs": {
"sum_items_likes": {
"sum": {
"field": "reactions.likes"
}
}, ...
}
},
"group2": ...
}
}
我想按" aggregations.groupX.sum_items_likes"
排序我借此机会询问在汇总之前是否值得预先过滤 page_id
感谢您的帮助