The method builder() is undefined for the type TransportClient


(Lorenzo Lucioni) #1

My code is:
...
settings = org.elasticsearch.common.settings.Settings.builder().put("cluster.name","es01t").build();
client = org.elasticsearch.client.transport.TransportClient.builder().settings(settings).build().addTransportAddress(new org.elasticsearch.common.transport.InetSocketTransportAddress(java.net.InetAddress.getByName("localhost"),Integer.valueOf(22099)));
...

BUT Eclipse warns me:
"The method builder() is undefined for the type TransportClient"

Any suggestion?

ES and Lucene versions are:
elasticsearch-5.2.2.jar
lucene-core-4.4.0.jar

Thank you,
Lorenzo


(David Pilato) #2

Read https://www.elastic.co/guide/en/elasticsearch/client/java-api/current/transport-client.html


(system) #4

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.