首页 > 解决方案 > Elasticsearch 索引:/fulltext_2/doc/xxxxx 导致阻塞:[FORBIDDEN/12/index 只读/允许删除

问题描述

有人可以告诉我这个错误是什么意思吗?Elasticsearch 索引:/fulltext_2/doc/xxxxx 导致阻塞:[FORBIDDEN/12/index 只读/允许删除我有一个本地 Elasticsearch 服务器。我创建了一个索引 fulltext_2,我想插入一些文档。有一个 PHP 脚本可以做到这一点。如果我有权创建索引,为什么我不能将任何项目插入数据库?到底是怎么回事?感谢您的任何帮助。

标签: databaseelasticsearchindexing

解决方案


您可以通过以下方式修复此错误:

curl -XPUT 'localhost:9200/_settings' -H 'Content-Type:application/json' -d '{"index":{"blocks":{"read_only_allow_delete":"false"}}}'
curl -XPUT 'localhost:9200/fulltext_2/_settings' -H 'Content-Type:application/json' -d '{"index":{"blocks":{"read_only_allow_delete":"false"}}}'

推荐阅读