ImmutableSettings.Builder settingsBuilder =
ImmutableSettings.settingsBuilder();
settingsBuilder.put("cluster.name", clusterName);
TransportClient client = new TransportClient(settingsBuilder.build());
for (String host : hostNames)
{
InetSocketTransportAddress server_address = new
InetSocketTransportAddress(
host, portTransport);
client.addTransportAddress(server_address);
}
Brian
--
You received this message because you are subscribed to the Google Groups
"elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/elasticsearch/4f02b8f3-3571-4746-9797-68df679501b6%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.