ES聚合查询
{
"query": {
"bool": {
"must": [
{
"terms": {
"orderId": [
"58880570952990",
"58882596943998",
"58880654706404"
]
}
},
{
"term": {
"billType": "110"
}
}
],
"must_not": [],
"should": [],
"filter": []
}
},
"aggs": {
"amount": {
"sum": {
"field": "amount"
}
},
"orderIdcount": {
"terms": {
"field": "orderId",
"size":300
}
}
},
"from": 0,
"size": 1,
"sort": [],
"profile": false
}