标签:agg 总数 col 聚合 search msisdn arch ast sel
1. 获取子聚合结果总数 { "size": 0, "aggs": { "msisdnAgg": { "terms": { "field": "msisdn" }, "aggs": { "tagAggs": { "terms": { "field": "tags" } }, "sum_of_rul": { "sum_bucket": { "buckets_path": "tagAggs>_count" } } } } } } 2. 获取子聚合结果总数大于指定数 { "size": 0, "aggs": { "msisdnAgg": { "terms": { "field": "msisdn" }, "aggs": { "tagAggs": { "terms": { "field": "tags" } }, "sum_of_rul": { "sum_bucket": { "buckets_path": "tagAggs>_count" } }, "orderNumber_count_filter": { "bucket_selector": { "buckets_path": { "orderNumberCount": "sum_of_rul" }, "script": "orderNumberCount > 2 " } } } } } }
标签:agg 总数 col 聚合 search msisdn arch ast sel
原文地址:https://www.cnblogs.com/sunfie/p/10428460.html