How to create node using host IPAddress using java library?

Hi

I'm install elastic search 0.16.2 on Debian Linux.I want to connect
elastic server which is install Debian machine. previously I install
elastic server in my machine.for creating node i used following code:

Settings settings = ImmutableSettings.settingsBuilder()
.put("index.number_of_shards",1)
.build();
Node node = NodeBuilder.nodeBuilder()
.client(true).settings(settings)
.local(true)
.node().start();

Note: “local”meaning that local servers started within the same JVM
will discover themselves and form a cluster.

Linux box IPAddress 192.168.1.100 where elastic server is
install.where I mention to connect Linux box elastic search using
java ?

Thanks

If you want to connect to a remote node / cluster, then you should not use
"local". What it means is that a cluster will be formed from the nodes
started within the same JVM, but thats it.

You can either start a Node client or a transport client, that will connect
to the remote node / cluster. Explained here:
Elasticsearch Platform — Find real-time answers at scale | Elastic.

On Wed, Aug 24, 2011 at 10:14 AM, sam mishra.sameek@gmail.com wrote:

Hi

I'm install Elasticsearch 0.16.2 on Debian Linux.I want to connect
elastic server which is install Debian machine. previously I install
elastic server in my machine.for creating node i used following code:

Settings settings = ImmutableSettings.settingsBuilder()
.put("index.number_of_shards",1)
.build();
Node node = NodeBuilder.nodeBuilder()
.client(true).settings(settings)
.local(true)
.node().start();

Note: “local”meaning that local servers started within the same JVM
will discover themselves and form a cluster.

Linux box IPAddress 192.168.1.100 where elastic server is
install.where I mention to connect Linux box Elasticsearch using
java ?

Thanks