I’m trying to execute the following line, but it throws an error (that I’m supposed to avoid by running the same code):
es.indices.put_settings(index="demo_index", body={
"blocks": {
"read_only_allow_delete": "false"
}
})
Error: elasticsearch.exceptions.AuthorizationException: AuthorizationException(403, 'cluster_block_exception', 'blocked by: [FORBIDDEN/12/index read-only / allow delete (api)];')
It I trigger the same query by using curl, it is sucessfully executed and I don’t have the error:
curl -XPUT 'localhost:9200/demo_index/_settings' -H 'Content-Type: application/json' -d '{ "index": { "blocks": { "read_only_allow_delete": "false" } } }'
I also tried to use "null" instead of "false", but I’m getting the same result. Any idea?