The method builder() is undefined for the type TransportClient

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

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

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