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: docs/release-notes/release-highlights.asciidoc
+174Lines changed: 174 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -5,6 +5,180 @@ These are the important new features and changes in minor releases. Every releas
5
5
6
6
For a list of detailed changes, including bug fixes, please see the https://github.com/elastic/elasticsearch-java/releases[GitHub project realease notes].
7
7
8
+
[discrete]
9
+
==== Version 8.18
10
+
11
+
**Breaking changes**
12
+
13
+
While we try to limit breaking changes to the minimum between minor versions of the client, all the following changes were necessary to keep the client code in sync with the server code and to fix client side bugs.
14
+
15
+
* Removed deprecated `LanguageAnalyzer`
16
+
* Removed unused `NodeReloadError`
17
+
* Removed unused `SearchApplicationListItem`
18
+
* Removed `InferenceRequest`, `InferenceResponse`, `InferenceResult`, `InferenceResultVariant` as part of a complete refactor of the Inference API
19
+
20
+
* `SearchRequest`,`SubmitRequest`: `indicesBoost` field modified from `List<Map<String,Double>>` to `List<NamedValue<Double>>`, because the server does not accept more than one value in the map.
21
+
** Old:
22
+
+
23
+
[source,java]
24
+
----
25
+
esClient.search(s -> s
26
+
.index("*")
27
+
.indicesBoost(Map.of("index", 1.0))
28
+
,Void.class);
29
+
----
30
+
+
31
+
** New:
32
+
+
33
+
[source,java]
34
+
----
35
+
esClient.search(s -> s
36
+
.index("*")
37
+
.indicesBoost(NamedValue.of("index", 1.0))
38
+
,Void.class);
39
+
----
40
+
+
41
+
42
+
* `PutMappingRequest`: `dynamicTemplates` field modified from `List<Map<String, DynamicTemplate>>` to `List<NamedValue<DynamicTemplate>>`, same reason as above.
43
+
* `DenseVectorIndexOptions`: `type` field modified from `String` to enum `DenseVectorIndexOptionsType`
44
+
* `DenseVectorProperty`:
45
+
** `elementType` field modified from `String` to enum `DenseVectorElementType`
46
+
** `similarity` field modified from `String` to enum `DenseVectorSimilarity`
47
+
* `DynamicTemplate`: `runtime` field modified from `Property` to `RuntimeField`, fixing a previous wrong mapping of the property.
48
+
* `ObjectProperty`: `subobjects` field modified from `Boolean` to `Subobjects`
49
+
* `TypeMapping`: `subobjects` field modified from `Boolean` to `Subobjects`
50
+
* `FollowerIndexParameters`:
51
+
** `maxOutstandingReadRequests` field modified from `int` to `Long`, now optional
52
+
** `maxOutstandingWriteRequests` field modified from `int` to `Integer`, now optional
53
+
** `maxReadRequestOperationCount` field modified from `int` to `Integer`, now optional
54
+
** `maxWriteBufferCount` field modified from `int` to `Integer`, now optional
55
+
** `maxWriteRequestOperationCount` field modified from `int` to `Integer`, now optional
56
+
* `FollowRequest`
57
+
** `maxOutstandingWriteRequests` field modified from `Long` to `Integer`
58
+
** `maxReadRequestOperationCount` field modified from `Long` to `Integer`
59
+
** `maxWriteBufferCount` field modified from `Long` to `Integer`
60
+
** `maxWriteRequestOperationCount` field modified from `Long` to `Integer`
61
+
* `ScriptsPainlessExecuteRequest`: `context` field modified from `String` to `PainlessContext`
62
+
* `DataStreamWithLifecycle`: `lifecycle` field modified from `DataStreamLifecycle` to `DataStreamLifecycleWithRollover`
63
+
* `elasticsearch.search_application.PutRequest`: `searchApplication` field modified from `SearchApplication` to `SearchApplicationParameters`
64
+
* `TrainedModelDeploymentNodesStats`: `routingState` field modified from `TrainedModelAssignmentRoutingTable` to `TrainedModelAssignmentRoutingStateAndReason`
65
+
66
+
67
+
**New Features**
68
+
69
+
* BulkIngester retry policy
70
+
+
71
+
Retry logic can now be enabled allowing the BulkIngester to retry operations that failed with error 429 (too many requests), hoping that the error will recover and the request will go through. Users can configure the desired backoff policy using the backoffPolicy() method in the BulkIngester builder:
This is an example of constant backoff, meaning the single failed operation will be retried 8 times every 50 milliseconds.
84
+
85
+
* Default class for methods requiring TDocument
86
+
+
87
+
Some requests in the client require a second parameter to define the result class, for example `search`, meaning the compiler will complain while the query is being written, which can be annoying. We added overload methods that use `Void.class` as default type, so that the correct type can be eventually added later into writing the query.
88
+
+
89
+
Example with `search`:
90
+
91
+
- Old:
92
+
+
93
+
[source,java]
94
+
----
95
+
esClient.search(s -> s
96
+
.index("my-index")
97
+
.query(q -> q
98
+
.matchAll(m -> m)
99
+
)
100
+
,Object.class);
101
+
----
102
+
103
+
- New:
104
+
+
105
+
[source,java]
106
+
----
107
+
esClient.search(s -> s
108
+
.index("my-index")
109
+
.query(q -> q
110
+
.matchAll(m -> m)
111
+
)
112
+
);
113
+
----
114
+
115
+
* Builder setters overloads with variant type
116
+
+
117
+
Added more setters allowing to build requests with a specific type variant instead of having to use the parent class and then select the desired variant later.
118
+
+
119
+
Example with `query`, where the `query` field can now accept a `MatchAllQuery` (or any other variant) directly:
120
+
121
+
- Old:
122
+
+
123
+
[source,java]
124
+
----
125
+
esClient.search(s -> s
126
+
.index("my-index")
127
+
.query(q -> q
128
+
.matchAll(m -> m)
129
+
)
130
+
);
131
+
----
132
+
- New:
133
+
+
134
+
[source,java]
135
+
----
136
+
esClient.search(s -> s
137
+
.index("my-index")
138
+
.query(MatchAllQuery.of(m -> m))
139
+
);
140
+
----
141
+
+
142
+
Example with `aggregations`, where the `aggregations` field can now accept `AverageAggregation` (or any other variant) directly:
143
+
144
+
- Old:
145
+
+
146
+
[source,java]
147
+
----
148
+
// using functional builder shortcut
149
+
esClient.search(s -> s
150
+
.aggregations("agg", a -> a
151
+
.avg(av -> av
152
+
.field("price")
153
+
)
154
+
)
155
+
);
156
+
157
+
// using Aggregation class builder
158
+
esClient.search(s -> s
159
+
.aggregations("agg", Aggregation.of(ag -> ag
160
+
.avg(av -> av
161
+
.field("price"))
162
+
)
163
+
)
164
+
);
165
+
----
166
+
167
+
- New:
168
+
+
169
+
[source,java]
170
+
----
171
+
esClient.search(s -> s
172
+
.aggregations("agg", AverageAggregation.of(av -> av
173
+
.field("price"))
174
+
)
175
+
);
176
+
----
177
+
178
+
[discrete]
179
+
==== Version 8.17
180
+
* No new feature.
181
+
8
182
[discrete]
9
183
==== Version 8.16
10
184
* `ElasticsearchClient` is now `Closeable`. Closing a client object also closes the underlying transport - https://github.com/elastic/elasticsearch-java/pull/851[#851]
0 commit comments