In the Jest readme there is an example of creating index with settings but it uses the ImmutableSettings
class from ElasticSearch library.
Unfortunately due to some conflicts, we can't include ElasticSearch library in our project. Is there a way to use CreateIndex.Builder to create index with settings without using ImmutableSettings
class from ElasticSearch library?
String settings = "\"settings\" : {\n" +
" \"number_of_shards\" : 5,\n" +
" \"number_of_replicas\" : 1\n" +
" }\n";
client.execute(new CreateIndex.Builder("articles").settings(ImmutableSettings.builder().loadFromSource(settings).build().getAsMap()).build());