Elasticsearch java client Rest Api

Hii Guys, i using java api client to search data in elasticsearch, i have followed the documents but i have the error in this line

  • TransportClient client = new PreBuiltTransportClient(Settings.EMPTY)

the error says that PreBuiltTransportClient cannot be resolved to a type
My elasticsearch is 6.4.3,i have added jars of same 6.4.3
is it correct? How to resolve it?

Probably you did not import correctly the dependencies or did not import the class in your java class.

1 Like

Yaah!! I have corrected it and i have connected it
thank you

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