Skip to content

Commit 3154c74

Browse files
authored
Add info to readme about Elasticsearch versions.
Original Pull Request #2128 Closes #2127
1 parent 1407d4d commit 3154c74

File tree

1 file changed

+24
-1
lines changed

1 file changed

+24
-1
lines changed

Diff for: README.adoc

+24-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
12
image:https://spring.io/badges/spring-data-elasticsearch/ga.svg[Spring Data Elasticsearch,link=https://projects.spring.io/spring-data-elasticsearch#quick-start] image:https://spring.io/badges/spring-data-elasticsearch/snapshot.svg[Spring Data Elasticsearch,link=https://projects.spring.io/spring-data-elasticsearch#quick-start]
23

34
= Spring Data for Elasticsearch image:https://jenkins.spring.io/buildStatus/icon?job=spring-data-elasticsearch%2Fmain&subject=Build[link=https://jenkins.spring.io/view/SpringData/job/spring-data-elasticsearch/] https://gitter.im/spring-projects/spring-data[image:https://badges.gitter.im/spring-projects/spring-data.svg[Gitter]]
@@ -12,13 +13,35 @@ This project is lead and maintained by the community.
1213
== Features
1314

1415
* Spring configuration support using Java based `@Configuration` classes or an XML namespace for a ES clients instances.
15-
* `ElasticsearchRestTemplate` helper class that increases productivity performing common ES operations.
16+
* `ElasticsearchOperations` class and implementations that increases productivity performing common ES operations.
1617
Includes integrated object mapping between documents and POJOs.
1718
* Feature Rich Object Mapping integrated with Spring’s Conversion Service
1819
* Annotation based mapping metadata
1920
* Automatic implementation of `Repository` interfaces including support for custom search methods.
2021
* CDI support for repositories
2122

23+
== About Elasticsearch versions and clients
24+
25+
=== Elasticsearch 7.17 client libraries
26+
27+
At the end of 2021 Elasticsearch with version 7.17 released the new version of their Java client and deprecated the `RestHighLevelCLient` which was the default way to access Elasticsearch up to then.
28+
29+
Spring Data Elasticsearch will in version 4.4 offer the possibility to optionally use the new client as an alternative to the existing setup using the `RestHighLevelCLient`.
30+
The default client that is used still is the `RestHighLevelCLient`, first because the integration of the new client is not yet complete, the new client still has features missing and bugs which will hopefully be resolved soon.
31+
Second, and more important, the new Elasticsearch client forces users to switch from using `javax.json.spi.JsonProvider` to `jakarta.json.spi.JsonProvider`.
32+
Spring Data Elasticsearch cannot enforce this switch; Spring Boot will switch to `jakarta` with version 3 and then it's safe for Spring Data Elasticsearch to switch to the new client.
33+
34+
So for version 4.4 Spring Data Elasticsearch will keep using the `RestHighLevelCLient` in version 7.17.x (as long as this will be available).
35+
36+
=== Elasticsearch 8 client libraries
37+
38+
In Elasticsearch 8, the `RestHighLevelCLient` has been removed.
39+
This means that a switch to this client version can only be done with the next major upgrade which will be Spring Data Elasticsearch 5, based on Spring Data 3, used by Spring Boot 3, based on Spring 6 and Java 17.
40+
41+
=== Elasticsearch 8 cluster
42+
43+
It should be possible to use the Elasticsearch 7 client to access a cluster running version 8 by setting the appropriate aompatibility headers (see the documentation at https://docs.spring.io/spring-data/elasticsearch/docs/current/reference/html/#elasticsearch.clients.configuration). but I encountered and heard of cases where the response from the server is not parseable by the client although the headers are set, so use with care.
44+
2245
== Code of Conduct
2346

2447
This project is governed by the https://github.com/spring-projects/.github/blob/e3cc2ff230d8f1dca06535aa6b5a4a23815861d4/CODE_OF_CONDUCT.md[Spring Code of Conduct].

0 commit comments

Comments
 (0)