I made some elasticsearch query like below and it works well.
"aggregations" : {
"agg_sum" : {
"sum" : {
"field" : "cnt"
}
},
"bucket_filter": {
"bucket_selector": {
"buckets_path": {
"totalSales": "agg_sum"
},
"script": "totalSales >= 10"
}
}
}
It needed to be converted as java api query, but don't know how to convert "buckets_filter". any idea of this?