elasticsearch 中的桶过多异常

问题描述 投票:0回答:2

我试图在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
}

请提出解决方案。预先感谢

检查如何更改存储桶大小。

python elasticsearch
2个回答
0
投票

放置_集群/设置

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

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


0
投票

尝试增加 search.max_buckets 并看看会发生什么: PUT _集群/设置

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

但这会消耗更多内存并给集群带来负载,或者您可以使用elasticsearch中的下采样功能,请参阅此文档:https://www.elastic.co/guide/en/elasticsearch/reference/current/downsampling.html

© www.soinside.com 2019 - 2024. All rights reserved.