使用'bodybuilder',是否可以获得'bucket_selector'聚合。
我正试图得到这样的东西:
"aggs": {
"aggname1": {
"terms": {
"field": "field1",
"size": 5
},
"aggs": {
"aggname2": {
"avg": {
"field": "field2"
}
},
"a_bucker_filter": {
"bucket_selector": {
"buckets_path": {
"bucker_selector_name": "aggname2"
},
"script": [script]
}
}
}
}