Thanks David once again. Can you please help in deciding which one should I go for NodeClient or TransportClient for production deployments. >From the elastic search documentation what I understand is that Node client eliminates the double hop that is present in Transport Client. Shall I opt for Node client then? Please suggest.
On Monday, January 5, 2015 8:17:40 PM UTC+5:30, David Pilato wrote: > > If you don’t want to define transport addresses, you’d better use a > NodeClient. > A NodeClient is actually a node running inside the cluster (with auto > discovery…) but without any data. > > You just need to provide the cluster name with a NodeClient. See > http://www.elasticsearch.org/guide/en/elasticsearch/client/java-api/current/client.html#node-client > > > -- > *David Pilato* | *Technical Advocate* | *Elasticsearch.com > <http://Elasticsearch.com>* > @dadoonet <https://twitter.com/dadoonet> | @elasticsearchfr > <https://twitter.com/elasticsearchfr> | @scrutmydocs > <https://twitter.com/scrutmydocs> > > > > Le 5 janv. 2015 à 13:46, Vijay Tiwary <vijaykr...@gmail.com <javascript:>> > a écrit : > > I am trying to connect remotely to elastic search cluster having 2 nodes > My question is I am able to query successfully only when we configure both > the cluster name and host name of the individual nodes? Why it doesn't work > if I only configure the cluster name in my client code > > Settings settings = ImmutableSettings.settingsBuilder() > .put("cluster.name", "myClusterName").build(); > > Client client = new TransportClient(settings ).addTransportAddress(new > InetSocketTransportAddress("host1", 9300)) > > .addTransportAddress(new InetSocketTransportAddress("host2", 9300)); > > > -- > 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 elasticsearc...@googlegroups.com <javascript:>. > To view this discussion on the web visit > https://groups.google.com/d/msgid/elasticsearch/dd201d66-71b4-4d74-bb99-255144a083a2%40googlegroups.com > > <https://groups.google.com/d/msgid/elasticsearch/dd201d66-71b4-4d74-bb99-255144a083a2%40googlegroups.com?utm_medium=email&utm_source=footer> > . > For more options, visit https://groups.google.com/d/optout. > > > -- 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 elasticsearch+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/98810b45-e4b5-4776-ac45-ba6b41adeff9%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.