Spring Data Version Compatibility with ES 6.x compatibility

Hi,

I have my Spring Data version as 3.0.5 and ElasticSearch version as 5.6.10.
Now, I want to migrate Elasticsearch version to 6.x. So, will my Spring data be compatible with ElasticSearch 6.x version.

Thank you

Hi @Dibyakanta,

I think following lists the Spring data Elasticsearch version and what version of ES it supports.

To support other versions you will need to raise an issue on their project.
Hope this helps.

Regards,
Yogesh Gaikwad

Hi Yogesh,

Thank you for the help.

I checked the link shared by you. When I selected Spring branch as 3.0.x, I got a table as below:

spring data elasticsearch elasticsearch
3.0.x 5.5.0
2.1.x 2.4.0
2.0.x 2.2.0
1.3.x 1.5.2

And when I selected tag as 3.0.5.RELEASE(the exact version with tag in which I am working), output which I got is:

spring data elasticsearch elasticsearch
3.0.0.RC2 5.5.0
3.0.0.M4 5.4.0
2.0.4.RELEASE 2.4.0
2.0.0.RELEASE 2.2.0
1.4.0.M1 1.7.3
1.3.0.RELEASE 1.5.2
1.2.0.RELEASE 1.4.4
1.1.0.RELEASE 1.3.2
1.0.0.RELEASE 1.1.1

So, can you please make me understand the meaning of these tables.

Thank You.

Regards,
Dibyakanta

I am not sure where you looked at

Following is the one from the github project - README file

spring data elasticsearch elasticsearch
3.2.x 6.5.0
3.1.x 6.2.2
3.0.x 5.5.0
2.1.x 2.4.0
2.0.x 2.2.0
1.3.x 1.5.2

OK.

In this table, can you please make me understand how this table works.

Whats my point is that, if I have ElasticSearch version 6.0, so in which category will this go, or say which Spring version will be compatible(because 6.0 lies in between 3.0.x and 3.1.x)?

Hi @Dibyakanta,

You have mentioned you want to upgrade to ES 6.x version and not the exact version. I assume you would want to move to the greatest version that is supported by Spring data. So in that case as per the project readme, it would be any version of Spring (3.2.x) would be compatible with 6.5.0.

I think the best possible way to know version compatibility would be to ask in Spring forums and Spring data project is not maintained by Elastic.

Hope this helps.

Regards,
Yogesh Gaikwad

Hi Yogesh,

Thank you for the information.
But I am still confused because my Spring version is 3.0.5(It can't be migrated). So can I go with migrating ElasticSearch to ES 6.0 with the above version of Spring.

I searched for Spring forum at this link https://spring.io/blog/2019/02/06/legacy-forums-will-be-shutdown-february-28. But it says that Spring forums have been Shutdown.

Thank You.

Regards,
Dibyakanta

Hi @Dibyakanta,

I see you do not have an option to upgrade Spring version, I am not sure whether the ES 6.x would be compatible with Spring version 3.0.x.
As per dependencies (https://mvnrepository.com/artifact/org.springframework.data/spring-data-elasticsearch/3.0.14.RELEASE) it depends on:
org.elasticsearch.client/transport [ 5.5.0]
org.elasticsearch.plugin/transport-netty4-client [ 5.5.0]

As you can see from here:
https://www.elastic.co/guide/en/elasticsearch/client/java-api/current/client.html
we recommend the clients be on the same major version. So if you want to use ES 6.x you will need to upgrade Spring and transport client dependencies.

Also,

We plan on deprecating the TransportClient in Elasticsearch 7.0 and removing it completely in 8.0. Instead, you should be using the Java High Level REST Client, which executes HTTP requests rather than serialized Java requests. The migration guide describes all the steps needed to migrate.

So I guess best way forward would be to use Java High Level REST Client, if not then try upgrade to Spring latest version which support ES 6.x.
Other options include compiling spring data elasticsearch with the new version of transport clients but not sure whether this is something that could be done.

Hope this helps.

Regards,
Yogesh Gaikwad

Hi Yogesh,

I have planned to use JAVA High Level Client 6.0 with Spring version as 3.0.5 and ES 6.0 and compile my code. I'll do this and let you know about my observations.

Is there any hard and fast rule about compatibility of ES versions with Spring versions?

Thank you very much for the help.

Regards,
Dibyakanta

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