gpt4 book ai didi

elasticsearch - 运行 Elasticsearch 复合聚合时出现“未知的 BaseAggregationBuilder [复合] 错误”

转载 作者:行者123 更新时间:2023-12-02 22:21:15 25 4
gpt4 key购买 nike

我正在尝试根据此处的文档创建复合聚合:
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 上运行

最佳答案

复合 aggs 发布于 6.1.0 .该错误听起来像是您不可能使用 >=6.1 但有些较旧的版本。

你是什​​么version.number当您运行时 curl -X GET "localhost:9200" ?

关于elasticsearch - 运行 Elasticsearch 复合聚合时出现“未知的 BaseAggregationBuilder [复合] 错误”,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/61496439/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com