JAVA API and Use of Node/Transport Client


(Ramdev Wudali) #1

Hi All:
As I understand from various posts and talking to one of the ES Dev guys at a recent meetup, The Transport Client/Node Client method of connecting to ES is going to go away/ made not available for connecting to ES.Instead, the REST API is being recommended.
This is fine, However, How do I get the Query Builder functionality to create more complex Queries without having to rely on a versioned ES jar ?

AS I understand it, REST API to ES is supposed to move us away from being version reliant. (meaning same version of ES and corresponding jar and java versions and other similar things). If to build queries I rely on a specific version of ES, am I not again tied to a specific version and hence even using the REST API is defeated ?

Any thoughts on this ? What is the recommendation, while the REST API is being used, to construct the queries ? or should there be a one of "rigid" implementation to handle a specific use case ?

Thanks

Ramdev


(Luca Cavanna) #2

Hello,
although that is the direction, we don't provide yet a Java REST client, so if your application is written in Java, the best way to connect to elasticsearch is still the Transport Client (not the node client, which we tend to promote less and less). Once we will have a Java REST client, not sure when, I guess we will have all the query builder functionalities there too, to ease the migration from the current java api.

Cheers
Luca


(system) #3