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: src/main/asciidoc/reference/elasticsearch-migration-guide-4.1-4.2.adoc
+23-6Lines changed: 23 additions & 6 deletions
Original file line number
Diff line number
Diff line change
@@ -9,24 +9,41 @@ This section describes breaking changes from version 4.1.x to 4.2.x and how remo
9
9
[[elasticsearch-migration-guide-4.1-4.2.removal]]
10
10
== Removals
11
11
12
+
The `@Score` annotation that was used to set the score return value in an entity was deprecated in version 4.0 and has been removed.
13
+
Scroe values are returned in the `SearchHit` instances that encapsulate the returned entities.
14
+
15
+
The `org.springframework.data.elasticsearch.ElasticsearchException` class has been removed.
16
+
The remaining usages have been replaced with `org.springframework.data.mapping.MappingException` and `org.springframework.dao.InvalidDataAccessApiUsageException`.
17
+
18
+
The deprecated `ScoredPage`, `ScrolledPage` `@AggregatedPage` and implementations has been removed.
19
+
20
+
The deprecated `GetQuery` and `DeleteQuery` have been removed.
21
+
22
+
The deprecated `find` methods from `ReactiveSearchOperations` and `ReactiveDocumentOperations` have been removed.
It was possible in 4.1 to configure the refresh policy for the `ReactiveElasticsearchTemplate` by overriding the method `AbstractReactiveElasticsearchConfiguration.refreshPolicy()` in a custom configuration class. The return value of this method was an instance of the class `org.elasticsearch.action.support.WriteRequest.RefreshPolicy`.
31
+
It was possible in 4.1 to configure the refresh policy for the `ReactiveElasticsearchTemplate` by overriding the method `AbstractReactiveElasticsearchConfiguration.refreshPolicy()` in a custom configuration class.
32
+
The return value of this method was an instance of the class `org.elasticsearch.action.support.WriteRequest.RefreshPolicy`.
20
33
21
-
Now the configuration must return `org.springframework.data.elasticsearch.core.RefreshPolicy`. This enum has the same values and triggers the same behaviour as before, so only the `import` statement has to be adjusted.
34
+
Now the configuration must return `org.springframework.data.elasticsearch.core.RefreshPolicy`.
35
+
This enum has the same values and triggers the same behaviour as before, so only the `import` statement has to be adjusted.
22
36
23
37
==== Refresh behaviour
24
38
25
-
`ElasticsearchOperations` and `ReactiveElasticsearchOperations` now explicitly use the `RefreshPolicy` set on the template for write requests if not null. If the refresh policy is null, then nothing special is done, so the cluster defaults are used. `ElasticsearchOperations` was always using the cluster default before this version.
39
+
`ElasticsearchOperations` and `ReactiveElasticsearchOperations` now explicitly use the `RefreshPolicy` set on the template for write requests if not null.
40
+
If the refresh policy is null, then nothing special is done, so the cluster defaults are used. `ElasticsearchOperations` was always using the cluster default before this version.
26
41
27
-
The provided implementations for `ElasticsearchRepository` and `ReactiveElasticsearchRepository` will do an explicit refresh when the refresh policy is null. This is the same behaviour as in previous versions. If a refresh policy is set, then it will be used by the repositories as well.
42
+
The provided implementations for `ElasticsearchRepository` and `ReactiveElasticsearchRepository` will do an explicit refresh when the refresh policy is null.
43
+
This is the same behaviour as in previous versions.
44
+
If a refresh policy is set, then it will be used by the repositories as well.
28
45
29
46
==== Refresh configuration
30
47
31
-
When configuring Spring Data Elasticsearch like described in <<elasticsearch.clients>> by using `ElasticsearchConfigurationSupport`, `AbstractElasticsearchConfiguration` or `AbstractReactiveElasticsearchConfiguration` the refresh policy will be initialized to `null`. Previously the reactive code initialized this to `IMMEDIATE`, now reactive and
32
-
non-reactive code show the same behaviour.
48
+
When configuring Spring Data Elasticsearch like described in <<elasticsearch.clients>> by using `ElasticsearchConfigurationSupport`, `AbstractElasticsearchConfiguration` or `AbstractReactiveElasticsearchConfiguration` the refresh policy will be initialized to `null`.
49
+
Previously the reactive code initialized this to `IMMEDIATE`, now reactive and non-reactive code show the same behaviour.
0 commit comments