0

I have been trying to write a Simple ElasticSearch Java search using some of the examples given on the websites. I have not implemented Spring or other frameworks. Most elastic-search examples appear to be incomplete code samples. Some of the websites I referenced are..

ElasticSearch Official Website

Spring ElasticSearch

My goal is to create a blog with some fully working examples. Many appear to reference ImmutableSettings class which does not appear to be on the list of classes. Even the most basic example "www.javacodegeeks.com/2013/04/getting-started-with-elasticsearch.html" references the ImmutableSettings which doesn't compile. Maybe I'm missing a Jar file.

My question is: Is there a fully working ElasticSearch 2.1 Java stand-alone example that I can get up and running without complex frameworks.

Thanks for helping me out.

Yogesh D
  • 1,558
  • 14
  • 29
Shawn
  • 2,679
  • 2
  • 15
  • 26

1 Answers1

0

ImmutableSettings is not available in elasticsearch versions greater than 2.0

If you are using it for transport client creation you can use

TransportClient transportClient = TransportClient.builder().build();

        transportClient.addTransportAddress(new InetSocketTransportAddress(InetAddress.getByName("127.0.0.1"), 9300));
AS-Sher
  • 384
  • 1
  • 4
  • 18