# Spring Data Version Compatibility with ES 6.x compatibility

**URL:** <https://discuss.elastic.co/t/spring-data-version-compatibility-with-es-6-x-compatibility/175384>\
**Category:** Elasticsearch\
**Created:** [April 4, 2019, 10:24am UTC](https://discuss.elastic.co/t/spring-data-version-compatibility-with-es-6-x-compatibility/175384 "2019-04-04T10:24:20Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![Dibyakanta](https://avatars.discourse-cdn.com/v4/letter/d/4491bb/32.png) [@Dibyakanta](https://discuss.elastic.co/u/Dibyakanta)\
**Post date:** [April 4, 2019, 10:24am UTC](https://discuss.elastic.co/t/spring-data-version-compatibility-with-es-6-x-compatibility/175384/1 "2019-04-04T10:24:20Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Yogesh\_Gaikwad](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/yogesh_gaikwad/32/27025_2.png) [@Yogesh\_Gaikwad](https://discuss.elastic.co/u/Yogesh_Gaikwad)\
**Post date:** [April 4, 2019, 12:04pm UTC](https://discuss.elastic.co/t/spring-data-version-compatibility-with-es-6-x-compatibility/175384/2 "2019-04-04T12:04:25Z")

</div>

Hi @Dibyakanta,

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

> **[spring-projects/spring-data-elasticsearch](https://github.com/spring-projects/spring-data-elasticsearch)**
>
> Spring Data Elasticsearch. Contribute to spring-projects/spring-data-elasticsearch development by creating an account on GitHub.

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

Regards,  
Yogesh Gaikwad

---

<div class="post-metadata">

**Author:** ![Dibyakanta](https://avatars.discourse-cdn.com/v4/letter/d/4491bb/32.png) [@Dibyakanta](https://discuss.elastic.co/u/Dibyakanta)\
**Post date:** [April 4, 2019, 12:58pm UTC](https://discuss.elastic.co/t/spring-data-version-compatibility-with-es-6-x-compatibility/175384/3 "2019-04-04T12:58:56Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Yogesh\_Gaikwad](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/yogesh_gaikwad/32/27025_2.png) [@Yogesh\_Gaikwad](https://discuss.elastic.co/u/Yogesh_Gaikwad)\
**Post date:** [April 4, 2019, 1:34pm UTC](https://discuss.elastic.co/t/spring-data-version-compatibility-with-es-6-x-compatibility/175384/4 "2019-04-04T13:34:51Z")

</div>

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 |

---

<div class="post-metadata">

**Author:** ![Dibyakanta](https://avatars.discourse-cdn.com/v4/letter/d/4491bb/32.png) [@Dibyakanta](https://discuss.elastic.co/u/Dibyakanta)\
**Post date:** [April 4, 2019, 2:43pm UTC](https://discuss.elastic.co/t/spring-data-version-compatibility-with-es-6-x-compatibility/175384/5 "2019-04-04T14:43:43Z")

</div>

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)?

---

<div class="post-metadata">

**Author:** ![Yogesh\_Gaikwad](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/yogesh_gaikwad/32/27025_2.png) [@Yogesh\_Gaikwad](https://discuss.elastic.co/u/Yogesh_Gaikwad)\
**Post date:** [April 4, 2019, 10:01pm UTC](https://discuss.elastic.co/t/spring-data-version-compatibility-with-es-6-x-compatibility/175384/6 "2019-04-04T22:01:17Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Dibyakanta](https://avatars.discourse-cdn.com/v4/letter/d/4491bb/32.png) [@Dibyakanta](https://discuss.elastic.co/u/Dibyakanta)\
**Post date:** [April 5, 2019, 8:12am UTC](https://discuss.elastic.co/t/spring-data-version-compatibility-with-es-6-x-compatibility/175384/7 "2019-04-05T08:12:15Z")

</div>

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](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

---

<div class="post-metadata">

**Author:** ![Yogesh\_Gaikwad](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/yogesh_gaikwad/32/27025_2.png) [@Yogesh\_Gaikwad](https://discuss.elastic.co/u/Yogesh_Gaikwad)\
**Post date:** [April 5, 2019, 10:37am UTC](https://discuss.elastic.co/t/spring-data-version-compatibility-with-es-6-x-compatibility/175384/8 "2019-04-05T10:37:17Z")

</div>

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](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:

> **[Client | Java Transport Client (deprecated) \[7.17\] | Elastic](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](https://www.elastic.co/guide/en/elasticsearch/client/java-rest/6.7/java-rest-high.html), which executes HTTP requests rather than serialized Java requests. The [migration guide](https://www.elastic.co/guide/en/elasticsearch/client/java-rest/6.7/java-rest-high-level-migration.html) 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

---

<div class="post-metadata">

**Author:** ![Dibyakanta](https://avatars.discourse-cdn.com/v4/letter/d/4491bb/32.png) [@Dibyakanta](https://discuss.elastic.co/u/Dibyakanta)\
**Post date:** [April 5, 2019, 12:22pm UTC](https://discuss.elastic.co/t/spring-data-version-compatibility-with-es-6-x-compatibility/175384/9 "2019-04-05T12:22:11Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [May 3, 2019, 12:22pm UTC](https://discuss.elastic.co/t/spring-data-version-compatibility-with-es-6-x-compatibility/175384/10 "2019-05-03T12:22:11Z")

</div>

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