例如es安装在本机
请求方式:GET localhost:9200/index_name/_settings?pretty
(这里我用的postman操作的,上图)
返回信息:
{
"index_name" : {
"settings" : {
"index" : {
"number_of_shards" : "5",
"blocks" : {
"read_only_allow_delete" : "true"
},
"provided_name" : "index_name",
"creation_date" : "1516454832121",
"number_of_replicas" : "1",
"uuid" : "5GjAtgAASDJKjsZnaOlaWdsa",
"version" : {
"created" : "5010877"
}
}
}
}
}
上方read_only_allow_delete属性是true,所以当前索引不能进行增、删操作。
2、解决:1、磁盘满了,清理磁盘。
2、把read_only_allow_delete属性删掉。
第一种方式:直接清理磁盘即可。
第二种方式:
请求方式:PUT
接口:localhost:9200/index_name/_settings
请求头设置为:Content-Type: application/json
参数:
{
"index":{
"blocks":{
"read_only_allow_delete":null
}
}
}
放到请求体内,以json格式传
上图:
问题解决!
该文章是参考其它文章种 linux 系统解决索引只读改的windows解决方式。



