Hi, i am new with Elasticsearch and i am trying to execute a simple search query.
Settings settings = Settings.settingsBuilder()
.put("cluster.name", "elasticsearch").build();
Client client = TransportClient.builder().settings(settings).build()
.addTransportAddress(new InetSocketTransportAddress(new InetSocketAddress("127.0.0.1", 9300)));
SearchResponse response = client.prepareSearch("logstash-2016.04.22")
.execute()
.actionGet();
System.out.println(response);
and Here the error logs:
avr. 22, 2016 6:41:45 PM org.elasticsearch.transport.netty.NettyTransport exceptionCaught
AVERTISSEMENT: [Ereshkigal] exception caught on transport layer [[id: 0x8e5bd9b6, /127.0.0.1:61531
=> /127.0.0.1:9300]], closing connection
-elasticsearch is running on the port 9300
-cluster name is elasticsearch
-the index is "logstash-2016.04.22"
-i am calling this code in a spring MVC controller
I am heared that it's a version problem isue so i am asking here.
Thank you in advence.