We are testing current version of the Java rest client for 5.0.0-alpha-4 and were wondering if there will be a Java DSL for the RestClient (similar to how there is for the old native client), or whether we are expected to create the appropriate json objects (or Jackson classes) needed in the requests ourselves.
indeed the current java REST client is low-level, it doesn't help with building json, which is something that you should do in your application. We do have plans to fill this gap in the future, see https://github.com/elastic/elasticsearch/issues/19055. That said, even before adding json builders, I think we will add a high level REST client that knows more about the api and exposes methods like
client.index("index", "type", "id", document);.
Nice, and thanks for the quick reply.
Judging from the issue this is planned to be included in the GA release of 5.0.0 right?
That is an optimistic plan I am afraid. The two most important changes in that meta issue were made and will be part of alpha5, there is a good chance that the high level client won't be part of 5.0 GA, not sure yet.
When can we expect the High Level REST client to be ready?
Given this article from last December, what is roughly the timeline for the Java REST client to get to a usable state? Is 6.0 a reasonable expectation? The current thin wrapper around httpclient is in my view not really a viable solution for anything since it lacks features. Also the documentation for using this is still largely missing in action, which leads me to wonder if this is at all something that is widely used currently.
I have for the past years hand rolled my own java HTTP rest clients on a couple of projects (most recently last week) and while quite straightforward to do it would be nice to not have that overhead on future projects. I'm currently using okhttp for this, which I find to be a bit easier than htttpclient, which I've also used in the past.
However, the low level http plumbing is not the issue here. What is the issue here is the complete absence of a sane, usable domain model on top. Most projects I know that use java either use the transport client or http with hand crafted models. I've been doing the latter. There are a handful of unofficial clients out there as well with various states of maintenance. I guess most are waiting for movement on the ES front on this.
So, given all that, an update on this would be appreciated.
The Advanced REST client is still under work in the master branch (6.0) and more and more things are getting merged as you can see with the following link:
BTW documentation has also started but not that much is available yet: https://www.elastic.co/guide/en/elasticsearch/client/java-rest/master/index.html
I hope this answers some of your questions.