Use http rest client or transport client


(Compasses) #1

Talk to elasticsearch have two ways when developing java app, http rest client or transport client, the ports are 9200 and 9300. So anyone do some deep test on these two ways? which one is better?


(David Pilato) #2

TransportClient comes with lot of builders which simplifies writing your code.
Rest Client is a low level one for now. But the team is working on it to add also builders and proper response objects. REST client works accross major versions.

TransportClient will be deprecated at some point.

My advice:

If you are doing simple things like index, search I'd recommend using REST.


(Compasses) #3

Ok. big thanks.


(system) #4

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