我们使用的是部署在我自己的服务器上的ElasticSearch 6.X。我们最近在云中迁移。所以我们使用的版本是7.X。我们有一个巨大的带有聚合的查询,它在6.X上工作,但这个查询不再工作了。这是由于版本之间的突破性更改造成的。
群集设置中的search.max_buckets编辑名为search.max_buckets的动态群集设置现在默认为10,000 (而不是以前版本中的无限制)。尝试返回超过限制的请求将失败,并出现异常。
因此,当我们使用聚合执行查询时,我们有一个例外:
"type" : "search_phase_execution_exception",
"reason" : "all shards failed",
"phase" : "query",
"grouped" : true,
"failed_shards" : [
{
"shard" : 0,
"index" : "xxxxxxx",
"node" : "xxxxxxxxxxxxxxxx",
"reason" : {
"type" : "too_many_buckets_exception",
"reason" : "Trying to create too many buckets. Must be less than or equal to: [10000] but was [10001]. This limit can be set by changing the [search.max_buckets] cluster level setting.",
"max_buckets" : 10000
}
}我们没有时间更改查询,所以我们如何在ElasticCloud上配置参数?或者,我可以向查询中添加参数吗?
谢谢你的帮助。
发布于 2020-02-25 04:36:07
我在ElasticSearch网站上找到了答案:https://discuss.elastic.co/t/increasing-max-buckets-for-specific-visualizations/187390
https://stackoverflow.com/questions/60381464
复制相似问题