Skip to content

Commit 6f0263b

Browse files
authored
Update documentation.
Closes #3192 Signed-off-by: Peter-Josef Meisch <[email protected]>
1 parent bcbe453 commit 6f0263b

File tree

6 files changed

+25
-17
lines changed

6 files changed

+25
-17
lines changed

src/main/antora/antora-playbook.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ content:
1717
- url: https://github.com/spring-projects/spring-data-commons
1818
# Refname matching:
1919
# https://docs.antora.org/antora/latest/playbook/content-refname-matching/
20-
branches: [ main, 3.4.x, 3.3.x ]
20+
branches: [ main ]
2121
start_path: src/main/antora
2222
asciidoc:
2323
attributes:

src/main/antora/modules/ROOT/pages/elasticsearch.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
Spring Data support for Elasticsearch contains a wide range of features:
66

77
* Spring configuration support for various xref:elasticsearch/clients.adoc[Elasticsearch clients].
8-
* The xref:elasticsearch/template.adoc[`ElasticsearchTemplate` and `ReactiveElasticsearchTemplate`] helper classes that provide object mapping between ES index operations and POJOs.
8+
* The xref:elasticsearch/template.adoc[`ElasticsearchTemplate` and `ReactiveElasticsearchTemplate`] helper classes that provide object mapping between Elasticsearch index operations and POJOs.
99
* xref:elasticsearch/template.adoc#exception-translation[Exception translation] into Spring's portable {springDocsUrl}data-access.html#dao-exceptions[Data Access Exception Hierarchy].
1010
* Feature rich xref:elasticsearch/object-mapping.adoc[object mapping] integrated with _Spring's_ {springDocsUrl}core.html#core-convert[Conversion Service].
1111
* xref:elasticsearch/object-mapping.adoc#elasticsearch.mapping.meta-model.annotations[Annotation-based mapping] metadata that is extensible to support other metadata formats.

src/main/antora/modules/ROOT/pages/elasticsearch/clients.adoc

Lines changed: 15 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ Although the Elasticsearch Client can be used directly to work with the cluster,
99
[[elasticsearch.clients.rest5client]]
1010
== Imperative Rest5Client
1111

12-
To use the imperative (non-reactive) Rest5Client, a configuration bean must be configured like this:
12+
To use the imperative (non-reactive) Rest5Client - the default client provided by the Elasticsearch Java client library from version 9 on -, a configuration bean must be configured like this:
1313

1414
====
1515
[source,java]
@@ -39,7 +39,9 @@ The following beans can then be injected in other Spring components:
3939
====
4040
[source,java]
4141
----
42-
import org.springframework.beans.factory.annotation.Autowired;@Autowired
42+
import org.springframework.beans.factory.annotation.Autowired;
43+
44+
@Autowired
4345
ElasticsearchOperations operations; <.>
4446
4547
@Autowired
@@ -83,7 +85,7 @@ To use the imperative (non-reactive) RestClient - deprecated since version 6 - ,
8385
----
8486
====
8587

86-
The configuration bean must be configured like this:
88+
The configuration bean must then be configured like this:
8789

8890
====
8991
[source,java]
@@ -113,14 +115,16 @@ The following beans can then be injected in other Spring components:
113115
====
114116
[source,java]
115117
----
116-
import org.springframework.beans.factory.annotation.Autowired;@Autowired
118+
import org.springframework.beans.factory.annotation.Autowired;
119+
120+
@Autowired
117121
ElasticsearchOperations operations; <.>
118122
119123
@Autowired
120124
ElasticsearchClient elasticsearchClient; <.>
121125
122126
@Autowired
123-
RestClient restClient; <.>
127+
RestClient restClient; <.>
124128
125129
@Autowired
126130
JsonpMapper jsonpMapper; <.>
@@ -167,6 +171,8 @@ The following beans can then be injected in other Spring components:
167171
====
168172
[source,java]
169173
----
174+
import org.springframework.beans.factory.annotation.Autowired;
175+
170176
@Autowired
171177
ReactiveElasticsearchOperations operations; <.>
172178
@@ -226,6 +232,8 @@ The following beans can then be injected in other Spring components:
226232
====
227233
[source,java]
228234
----
235+
import org.springframework.beans.factory.annotation.Autowired;
236+
229237
@Autowired
230238
ReactiveElasticsearchOperations operations; <.>
231239
@@ -294,7 +302,7 @@ ClientConfiguration clientConfiguration = ClientConfiguration.builder()
294302
295303
<.> Define default headers, if they need to be customized
296304
<.> Use the builder to provide cluster addresses, set default `HttpHeaders` or enable SSL.
297-
<.> Optionally enable SSL.There exist overloads of this function that can take a `SSLContext` or as an alternative the fingerprint of the certificate as it is output by Elasticsearch 8 on startup.
305+
<.> Optionally enable SSL.There exist overloads of this function that can take a `SSLContext` or as an alternative the fingerprint of the certificate as it is output by Elasticsearch on startup (since version 8).
298306
<.> Optionally set a proxy.
299307
<.> Optionally set a path prefix, mostly used when different clusters a behind some reverse proxy.
300308
<.> Set the connection timeout.
@@ -320,7 +328,7 @@ The following callbacks are provided:
320328
==== Configuration of the low level Elasticsearch `Rest5Client`:
321329

322330
This callback provides a `org.elasticsearch.client.RestClientBuilder` that can be used to configure the Elasticsearch
323-
`RestClient`:
331+
`Rest5Client`:
324332
====
325333
[source,java]
326334
----

src/main/antora/modules/ROOT/pages/elasticsearch/misc.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ When creating Elasticsearch indices with Spring Data Elasticsearch different ind
1111
The following arguments are available:
1212

1313
* `useServerConfiguration` does not send any settings parameters, so the Elasticsearch server configuration determines them.
14-
* `settingPath` refers to a JSON file defining the settings that must be resolvable in the classpath
14+
* `settingPath` refers to a JSON file defining the settings that must be resolvable in the classpath, it is possible to use a SpEL expression here
1515
* `shards` the number of shards to use, defaults to _1_
1616
* `replicas` the number of replicas, defaults to _1_
1717
* `refreshIntervall`, defaults to _"1s"_

src/main/antora/modules/ROOT/pages/elasticsearch/versions.adoc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,10 @@ The following table shows the Elasticsearch and Spring versions that are used by
66
[cols="^,^,^,^",options="header"]
77
|===
88
| Spring Data Release Train | Spring Data Elasticsearch | Elasticsearch | Spring Framework
9-
| 2025.1 (in development) | 6.0.x | 9.2.0 | 7.0.x
9+
| 2025.1 | 6.0.x | 9.2.0 | 7.0.x
1010
| 2025.0 | 5.5.x | 8.18.1 | 6.2.x
11-
| 2024.1 | 5.4.x | 8.15.5 | 6.1.x
12-
| 2024.0 | 5.3.xfootnote:oom[Out of maintenance] | 8.13.4 | 6.1.x
11+
| 2024.1 | 5.4.xfootnote:oom[Out of maintenance] | 8.15.5 | 6.1.x
12+
| 2024.0 | 5.3.xfootnote:oom[] | 8.13.4 | 6.1.x
1313
| 2023.1 (Vaughan) | 5.2.xfootnote:oom[] | 8.11.1 | 6.1.x
1414
| 2023.0 (Ullmann) | 5.1.xfootnote:oom[] | 8.7.1 | 6.0.x
1515
| 2022.0 (Turing) | 5.0.xfootnote:oom[] | 8.5.3 | 6.0.x

src/main/java/org/springframework/data/elasticsearch/client/elc/ReactiveElasticsearchConfiguration.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,7 @@
2222
import co.elastic.clients.transport.rest5_client.Rest5ClientOptions;
2323
import co.elastic.clients.transport.rest5_client.low_level.RequestOptions;
2424
import co.elastic.clients.transport.rest5_client.low_level.Rest5Client;
25-
import co.elastic.clients.transport.rest_client.RestClientOptions;
2625

27-
import com.fasterxml.jackson.annotation.JsonInclude;
28-
import com.fasterxml.jackson.databind.ObjectMapper;
29-
import com.fasterxml.jackson.databind.SerializationFeature;
3026
import org.elasticsearch.client.RestClient;
3127
import org.springframework.context.annotation.Bean;
3228
import org.springframework.data.elasticsearch.client.ClientConfiguration;
@@ -36,6 +32,10 @@
3632
import org.springframework.data.elasticsearch.core.convert.ElasticsearchConverter;
3733
import org.springframework.util.Assert;
3834

35+
import com.fasterxml.jackson.annotation.JsonInclude;
36+
import com.fasterxml.jackson.databind.ObjectMapper;
37+
import com.fasterxml.jackson.databind.SerializationFeature;
38+
3939
/**
4040
* Base class for a @{@link org.springframework.context.annotation.Configuration} class to set up the Elasticsearch
4141
* connection using the {@link ReactiveElasticsearchClient}. This class exposes different parts of the setup as Spring

0 commit comments

Comments
 (0)