Are there any advantages when using the REST API in a JVM app?

Hi everyone!

In an application I am working on, we are using a node client to access an ES cluster. We are evaluating a switch to the REST API.

However, from what I could find so far, the main purpose of the REST API is to have a way for non-JVM apps to communicate with ES and so that version upgrades are less painful.

Reading the docs, I could see that since version 1.x or so, clients are able to talk to a cluster, as long as they have the same version. That makes me think, that the only advantage of using the REST API in a JVM app could be to have a smoother upgrade from one major version to another.

Given that major version give some breaking changes and major features, it will still need a rewrite of part of client code, so the benefit is quite relative.

My question is: are my assumptions correct? Is there some really strong benefit in using the REST API in a JVM app?

Best wishes,


I'd use for now the official Java client (note that you have to upgrade it only when you switch to a new major version: 1.x -> 2.x -> 5.x

We will hopefully provide a REST client for 5.0 so I would not build my own for now.

My 2 cents.

1 Like

Thanks a lot, David! I was not aware of the plan to have a REST client in 5.0.0, so that is awesome. I started with Jest, which you are probably already aware of. The official client is definitely great news.