Looks good to me. I don't understand what your problem actually is. May be you don't have a fully working cluster?
What gives GET / for example? -- David Pilato | Technical Advocate | Elasticsearch.com @dadoonet | @elasticsearchfr Le 8 avril 2014 à 17:17:44, Subhadip Bagui ([email protected]) a écrit: Hi David, The singleton instance for client I'm not getting for existing client. Trying something like this. Can you please give some working example. public class ESClientSingleton { private static ESClientSingleton instance; private ESClientSingleton() { } public static Object getInstance() { if (instance == null) { ImmutableSettings.Builder settings = ImmutableSettings.settingsBuilder(); settings.put("node.client", true); settings.put("node.data", false); settings.put("node.name", "node-client"); settings.put("cluster.name", "elasticsearch"); settings.build(); Client client = new TransportClient(settings) .addTransportAddress(new InetSocketTransportAddress("localhost", 9300)); return client; } return instance; } } -- 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/7057090c-6b4f-4877-9a58-77fa3d16f2fb%40googlegroups.com. 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 [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/etPan.53442198.721da317.164d%40MacBook-Air-de-David.local. For more options, visit https://groups.google.com/d/optout.
