elasticsearch中的bucket异常太多

yrwegjxp  于 2023-05-22  发布在  ElasticSearch
关注(0)|答案(1)|浏览(222)

我试图在elasticsearch中命中查询8.6.1获取此问题-

{
    "error": {
        "root_cause": [],
        "type": "search_phase_execution_exception",
        "reason": "",
        "phase": "fetch",
        "grouped": true,
        "failed_shards": [],
        "caused_by": {
            "type": "too_many_buckets_exception",
            "reason": "Trying to create too many buckets. Must be less than or equal to: [65536] but this number of buckets was exceeded. This limit can be set by changing the [search.max_buckets] cluster level setting.",
            "max_buckets": 65536
        }
    },
    "status": 503
}

请提出解决方案。先谢谢你了
已检查如何更改存储桶大小。

ua4mk5z4

ua4mk5z41#

PUT _cluster/settings

{
    "persistent":{
        "search.max_buckets":20000
    }
}

请注意,search.max_buckets是一个安全软限制,旨在防止不良聚合伤害节点。太多的bucket会消耗更多的内存,请小心。

相关问题