【发布时间】:2018-02-05 17:38:59
【问题描述】:
我想在 ElasticSearch 2.4 中使用管道聚合(桶选择器聚合)到嵌套字段聚合。我想做类似于下面的事情,但我没有成功。如果可以在嵌套字段中进行管道聚合,您能否建议我?
{
"size": 0,
"aggregations": {
"totalPaidAmount": {
"nested": {
"path": "count"
},
"aggregations": {
"paidAmountTotal": {
"sum": {
"field": "count.totalPaidAmount"
}
},
"paidAmount_filter": {
"bucket_selector": {
"script": {
"inline": "amount > 5000000"
},
"buckets_path": {
"amount": "paidAmountTotal"
}
}
}
}
}
}
}
【问题讨论】:
标签: elasticsearch lucene