Search code examples
javaelasticsearchspring-data-elasticsearch

Java request for marking elasticsearch index block as null


I am facing cluster block exception due to lack of space on elastic search node. But after sufficient space is available I need to manually set the "index.blocks.read_only_allow_delete": null value using java high level rest client. Same I am able to do with Kibana but need some java equivalent of that. Kibana request :

PUT /_settings
{
  "index.blocks.read_only_allow_delete": null
}

Elastic version : 6.8.4 Java : 8


Solution

  • As the High Level Rest Client has no Support for his feature, you need to use the Low Level Rest Client or issue the http request by yourself