Use http rest client or transport client

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?

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.

Ok. big thanks.

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