Elasticsearch写入数据提示“no such index”错误

已解决

阿里云Elasticsearch写入数据提示“no such index and [action.auto_create_index] contains [-*] which forbids automatic creation of the index”错误。

展开
收起
游客rda5n5ukztvu2 2022-11-04 14:14:49 292 分享 版权
1 条回答
写回答
取消 提交回答
  • 采纳回答

    你好,阿里云es默认关闭action.auto_create_index,该报错显示当前集群未开启自动创建索引,建议您通过以下方式进行开启:

    1. 通过控制台集群配置开启自动创建索引,该操作为yml静态配置,会触发实例重启,详情请点此查看帮助文档。
    2. 通过动态方式快速开启(不需要重启):

    PUT /_cluster/settings

    {

        "persistent": {

            "action": {

                "auto_create_index": "true"

            }

        }

    }

    提示:该方式将完全开放索引创建 如需禁止,将true改成false。

    1. 开启部分索引自动创建能力,如下所示仅对系统索引开启自动创建索引: 

    PUT /_cluster/settings

    {  

        "persistent": {    

            "action": {      

                "auto_create_index": "+.*,-*"    

            }  

        }

    }

    更多使用请参考自动创建索引

    2022-11-04 14:47:34
    赞同 展开评论

阿里云检索分析服务Elasticsearch版兼容开源ELK功能,免运维全托管,提升企业数据检索与运维分析能力。

热门讨论

热门文章

还有其他疑问?
咨询AI助理