How to set cluster in ES 6.0 using rest client

Hi ,

  I have been using Transport client to set and using cluster for the past. I want to set cluster and minimum nodes in ES by using latest Rest client like how i used to create cluster with Transport client . Is there any way to do that ? .

No. And it does not make sense for the rest client.

Okay . So How do i set cluster or create new cluster without using Transport client programmatically ? . My intention is that i dont want to use Transport client

A client is a client. It does not start a server if this is what you meant by "starting a new cluster". It just connects to a running cluster.

agreed . I would like to achieve the below cluster settings feature by using rest client in elastic search 6.0 version (eg. setting cluster name and node) .this can be done using transport client. I understand that i can connect it by using rest client .but i want to update the cluster settings similar to what transport settings does or how can i do the cluster settings with latest rest client ?

  TransportClientFactoryBean factory = new TransportClientFactoryBean();



Is not needed.


It's well documented here I think:

okay . so how can I update the cluster name . is there any api available ? . There is one (/_cluster/settings). but that is also throwing exception as below . If its cant be , then how do I achieve this ? because in my existing application i use this transport factory to update cluster name when i am connecting it .

setting [], not dynamically updateable" .


I don't understand.

In the Transport Client, you can set the cluster name or you can ignore whatever cluster name the cluster has.

Everything is documented here:

But to answer your question, you can not update live the cluster name of a running cluster. Cluster name is set in elasticsearch.yml file.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.