Elasticsearch - Assigning Shards Elasticsearch - Assigning Shards elasticsearch elasticsearch

Elasticsearch - Assigning Shards


When starting a Node, one of the common settings to consider is if it should hold data or not. In other words, should indices and shards be allocated to it. Many times we would like to have the clients just be clients, without shards being allocated to them [1].

If you want to set up your client as being a non-data client (no shards) try setting it up like so by replacing this:

node = nodeBuilder().node();

with this:

node = nodeBuilder().client(true).node();

[1] http://www.elasticsearch.org/guide/reference/java-api/client.html