elasticsearchversionelasticsearch-high-level-restclientelasticsearch-java-api-client

can java API Client 7.16 be used with Elasticsearch 7.9.2?


Sorry if this is very obvious. we are currently using elasticsearch 7.9.2 for our application.

As per documentation

The Elasticsearch Java client is forward compatible; meaning that the client supports communicating with greater or equal minor versions of Elasticsearch. Elasticsearch language clients are only backwards compatible with default distributions and without guarantees made.

If i am not wrong, we will not be able to use java api client 7.16 with elasticsearch 7.9.2, But only elasticsearch version 7.16 or more. I just want to know whether i understood it right

I am using url fetch to communicate with es rest apis, i am planning to migrate to using es clients instead. Since the es high level rest client is deprecated, if es java client can be used with elasticsearch 7.9.2 i want to go ahead with it, instead of using deprecated high level rest client.


Solution

  • No you can't use the Elasticsearch java api client of 7.16 with Elasticsearch 7.9.2 as its mentioned by them its not backward compatible and many of the API will fail or at worst(As far as I remember) application was giving error when i tried using the Elasticsearch client which doesn't match the Elasticsearch server version.

    If you don't want to use the deprecated clients, best for you to upgrade your Elasticsearch server as its already old and there are many optimisations and improvements made after that.