大家好 ,請問一下如何使用Sum Bucket Aggregation java api 網路上都沒有example code thanks
you can do like this:
client.prepareSearch("index")
.addAggregation(AggregationBuilders
.sum("sum_name")
.field("field_name"));