【发布时间】:2020-08-13 05:24:07
【问题描述】:
我正在尝试根据此处的文档创建一个复合聚合: https://www.elastic.co/guide/en/elasticsearch/reference/6.8/search-aggregations-bucket-composite-aggregation.html
我基本上遵循这个例子:
curl -X GET "localhost:9200/_search?pretty" -H 'Content-Type: application/json' -d'
{
"aggs" : {
"my_buckets": {
"composite" : {
"sources" : [
{ "product": { "terms" : { "field": "product" } } }
]
}
}
}
}
'
但每次我尝试运行代码时,无论我尝试聚合哪个字段,都会收到以下错误:
{
"error" : {
"root_cause" : [
{
"type" : "unknown_named_object_exception",
"reason" : "Unknown BaseAggregationBuilder [composite]",
"line" : 5,
"col" : 27
}
],
"type" : "unknown_named_object_exception",
"reason" : "Unknown BaseAggregationBuilder [composite]",
"line" : 5,
"col" : 27
},
"status" : 400
}
我做了一些挖掘,并没有看到错误“Unknown BaseAggregationBuilder [composite]”出现在其他任何地方,所以我想我会在这里发布这个问题,看看是否有人遇到过类似的问题。基数和正则项聚合工作正常。另外澄清一下,我在 v6.8 上运行
【问题讨论】:
-
你能分享你的映射和示例文档吗
标签: elasticsearch elasticsearch-aggregation