. 获取子聚合结果总数
{
"size": ,
"aggs": {
"msisdnAgg": {
"terms": {
"field": "msisdn"
},
"aggs": {
"tagAggs": {
"terms": {
"field": "tags"
}
},
"sum_of_rul": {
"sum_bucket": {
"buckets_path": "tagAggs>_count"
}
}
}
}
}
} . 获取子聚合结果总数大于指定数 {
"size": ,
"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 "
}
}
}
}
}
}
05-11 16:25