Index built with:
{"settings":{"number_of_shards":"1","number_of_routing_shards":"2","number_of_replicas":"0"}}
ResizeRequest request = new ResizeRequest("code-000001", "code-000002");
Settings settings = Settings.builder()
.put("index.number_of_shards", 2)
.put("index.blocks.write", true)
.build();
request.setCopySettings(true); // used in CURL doc, no affect on error
request.getTargetIndexRequest().settings(settings); // tried via map also
request.getTargetIndexRequest().alias(new Alias("alias1"));
resizeResponse = ElasticDoc.getRestClient().indices().split(request, RequestOptions.DEFAULT);
Get following error:
//{"error":{"root_cause":[{"type":"illegal_state_exception","reason":"index code-000001 must be read-only to resize index. use "index.blocks.write=true""}],"type":"illegal_state_exception","reason":"index code-000001 must be read-only to resize index. use "index.blocks.write=true""},"status":500}
Environment: Windows 10, 1.8.0_171 JDK