Hi,
I am using elasticsearch 5.1.1 and trying to search ES DB using java API.
But, not able to initialize the Client with the below code :
import java.net.InetAddress;
import org.elasticsearch.client.transport.TransportClient;
import org.elasticsearch.common.settings.Settings;
import org.elasticsearch.common.transport.InetSocketTransportAddress;
TransportClient client = new PreBuiltTransportClient(Settings.EMPTY)
.addTransportAddress(new InetSocketTransportAddress(InetAddress.getByName("hostname"), 9200));
"PreBuiltTransportClient" id not recognized. Please suggest.