ES聚合查询

时间:2024-03-25 20:53:55
{ "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 }