You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CONTRIBUTING.adoc
-4
Original file line number
Diff line number
Diff line change
@@ -8,7 +8,3 @@ Do not submit a Pull Request before having created an issue and having discussed
8
8
== Running the test locally
9
9
10
10
In order to run the tests locally with `./mvnw test` you need to have docker running because Spring Data Elasticsearch uses https://www.testcontainers.org/[Testcontainers] to start a local running Elasticsearch instance.
11
-
12
-
== Class names of the test classes
13
-
14
-
Test classes that do depend on the client have either `ERHLC` (when using the deprecated Elasticsearch `RestHighLevelClient`) or `ELC` (the new `ElasticsearchClient`) in their name.
Copy file name to clipboardExpand all lines: README.adoc
+10-53
Original file line number
Diff line number
Diff line change
@@ -5,42 +5,20 @@ image:https://spring.io/badges/spring-data-elasticsearch/ga.svg[Spring Data Elas
5
5
The primary goal of the https://projects.spring.io/spring-data[Spring Data] project is to make it easier to build Spring-powered applications that use new data access technologies such as non-relational databases, map-reduce frameworks, and cloud based data services.
6
6
7
7
The Spring Data Elasticsearch project provides integration with the https://www.elastic.co/[Elasticsearch] search engine.
8
-
Key functional areas of Spring Data Elasticsearch are a POJO centric model for interacting with a Elasticsearch Documents and easily writing a Repository style data access layer.
8
+
Key functional areas of Spring Data Elasticsearch are a POJO centric model for interacting with Elasticsearch Documents and easily writing a Repository style data access layer.
9
9
10
10
This project is lead and maintained by the community.
11
11
12
12
== Features
13
13
14
-
* Spring configuration support using Java based `@Configuration` classes or an XML namespace for a ES clients instances.
14
+
* Spring configuration support using Java based `@Configuration` classes or an XML namespace for an ES client instances.
15
15
* `ElasticsearchOperations` class and implementations that increases productivity performing common ES operations.
16
16
Includes integrated object mapping between documents and POJOs.
17
17
* Feature Rich Object Mapping integrated with Spring’s Conversion Service
18
18
* Annotation based mapping metadata
19
19
* Automatic implementation of `Repository` interfaces including support for custom search methods.
20
20
* CDI support for repositories
21
21
22
-
== About Elasticsearch versions and clients
23
-
24
-
=== Elasticsearch 7.17 client libraries
25
-
26
-
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.
27
-
28
-
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`.
29
-
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.
30
-
Second, and more important, the new Elasticsearch client forces users to switch from using `javax.json.spi.JsonProvider` to `jakarta.json.spi.JsonProvider`.
31
-
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.
32
-
33
-
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).
34
-
35
-
=== Elasticsearch 8 client libraries
36
-
37
-
In Elasticsearch 8, the `RestHighLevelCLient` has been removed.
38
-
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.
39
-
40
-
=== Elasticsearch 8 cluster
41
-
42
-
It should be possible to use the Elasticsearch 7 client to access a cluster running version 8 by setting the appropriate compatibility 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.
43
-
44
22
== Code of Conduct
45
23
46
24
This project is governed by the https://github.com/spring-projects/.github/blob/e3cc2ff230d8f1dca06535aa6b5a4a23815861d4/CODE_OF_CONDUCT.md[Spring Code of Conduct].
@@ -86,25 +64,7 @@ public class MyService {
86
64
87
65
=== Using the RestClient
88
66
89
-
Provide a configuration like this:
90
-
91
-
[source,java]
92
-
----
93
-
@Configuration
94
-
public class RestClientConfig extends AbstractElasticsearchConfiguration {
95
-
96
-
@Override
97
-
@Bean
98
-
public RestHighLevelClient elasticsearchClient() {
99
-
100
-
final ClientConfiguration clientConfiguration = ClientConfiguration.builder()
Please check the [official documentation](https://docs.spring.io/spring-data/elasticsearch/docs/current/reference/html/#elasticsearch.clients.configuration).
108
68
109
69
=== Maven configuration
110
70
@@ -119,9 +79,6 @@ Add the Maven dependency:
119
79
</dependency>
120
80
----
121
81
122
-
// NOTE: since Github does not support include directives, the content of
123
-
// the src/main/asciidoc/reference/preface.adoc file is duplicated here
124
-
// Always change both files!
125
82
**Compatibility Matrix**
126
83
127
84
The compatibility between Spring Data Elasticsearch, Elasticsearch client drivers and Spring Boot versions can be found in the https://docs.spring.io/spring-data/elasticsearch/docs/current/reference/html/#preface.versions[reference documentation].
@@ -137,9 +94,9 @@ To use the Release candidate versions of the upcoming major version, use our Mav
137
94
</dependency>
138
95
139
96
<repository>
140
-
<id>spring-libs-snapshot</id>
97
+
<id>spring-snapshot</id>
141
98
<name>Spring Snapshot Repository</name>
142
-
<url>https://repo.spring.io/libs-milestone</url>
99
+
<url>https://repo.spring.io/milestone</url>
143
100
</repository>
144
101
----
145
102
@@ -154,9 +111,9 @@ If you'd rather like the latest snapshots of the upcoming major version, use our
154
111
</dependency>
155
112
156
113
<repository>
157
-
<id>spring-libs-snapshot</id>
114
+
<id>spring-snapshot</id>
158
115
<name>Spring Snapshot Repository</name>
159
-
<url>https://repo.spring.io/libs-snapshot</url>
116
+
<url>https://repo.spring.io/snapshot</url>
160
117
</repository>
161
118
----
162
119
@@ -180,7 +137,7 @@ If you want to raise an issue, please follow the recommendations below:
180
137
181
138
* Before you log a bug, please search the
182
139
https://github.com/spring-projects/spring-data-elasticsearch/issues[issue tracker] to see if someone has already reported the problem.
183
-
* If the issue doesn’t already exist, https://github.com/spring-projects/spring-data-elasticsearch/issues/new[create a new issue].
140
+
* If the issue doesn't already exist, https://github.com/spring-projects/spring-data-elasticsearch/issues/new[create a new issue].
184
141
* Please provide as much information as possible with the issue report, we like to know the version of Spring Data Elasticsearch that you are using and JVM version.
185
142
* If you need to paste code, or include a stack trace use Markdown +++```+++ escapes before and after your text.
186
143
* If possible try to create a test-case or project that replicates the issue.
@@ -211,10 +168,10 @@ Building the documentation builds also the project without running tests.
211
168
212
169
[source,bash]
213
170
----
214
-
$ ./mvnw clean install -Pdistribute
171
+
$ ./mvnw clean install -Pantora
215
172
----
216
173
217
-
The generated documentation is available from `target/site/reference/html/index.html`.
174
+
The generated documentation is available from `target/antora/site/index.html`.
Copy file name to clipboardExpand all lines: TESTING.adoc
-21
Original file line number
Diff line number
Diff line change
@@ -18,24 +18,3 @@ is run. There must be _docker_ running, as the integration tests use docker to s
18
18
19
19
Integration tests are tests that have the Junit5 Tag `@Tag("integration-test")` on the test class. Normally this should not be set explicitly, but the annotation `@SpringIntegrationTest` should be used. This not only marks the test as integration test, but integrates an automatic setup of an Elasticsearch Testcontainer and integrate this with Spring, so
20
20
that the required Beans can be automatically injected. Check _src/test/java/org/springframework/data/elasticsearch/JUnit5SampleRestClientBasedTests.java_ as a reference setup
21
-
22
-
== Mutation testing
23
-
24
-
The pom includes a plugin dependency to run mutation tests using [pitest](https://pitest.org/). These tests must be explicitly configured and run, they are not included in the normal build steps. Before pitest can run, a normal `./mvnw test` must be executed. The configuration excludes integration tests, only unit tests are considered.
25
-
26
-
27
-
pitest can be run directly from the commandline
28
-
----
29
-
./mvnw org.pitest:pitest-maven:mutationCoverage
30
-
----
31
-
This will output an html report to _target/pit-reports/YYYYMMDDHHMI_.
32
-
33
-
To speed-up repeated analysis of the same codebase set the withHistory parameter to true.
0 commit comments