Skip to content

Commit b99e5e4

Browse files
committed
Update release notes
1 parent c8ac001 commit b99e5e4

File tree

2 files changed

+73
-32
lines changed

2 files changed

+73
-32
lines changed

docs/release-notes/breaking-changes.md

Lines changed: 29 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -11,15 +11,32 @@ Breaking changes can impact your Elastic applications, potentially disrupting no
1111
% ## Next version [elasticsearch-net-client-nextversion-breaking-changes]
1212

1313
% ::::{dropdown} Title of breaking change
14+
%
15+
% **Impact**: High/Low.
16+
%
1417
% Description of the breaking change.
1518
% For more information, check [PR #](PR link).
16-
% **Impact**<br> Impact of the breaking change.
17-
% **Action**<br> Steps for mitigating deprecation impact.
19+
%
1820
% ::::
1921

2022
## 9.0.0 [elasticsearch-net-client-900-breaking-changes]
2123

22-
### 1. Container types
24+
### Overview
25+
26+
- [1. Container types](#1-container-types)
27+
- [2. Removal of certain generic request descriptors](#2-removal-of-certain-generic-request-descriptors)
28+
- [3. Removal of certain descriptor constructors and related request APIs](#3-removal-of-certain-descriptor-constructors-and-related-request-apis)
29+
- [4. Date / Time / Duration values](#4-date--time--duration-values)
30+
- [5. `ExtendedBounds`](#5-extendedbounds)
31+
- [6. `Field.Format`](#6-fieldformat)
32+
- [7. `Field`/`Fields` semantics](#7-fieldfields-semantics)
33+
- [8. `FieldValue`](#8-fieldvalue)
34+
- [9. `FieldSort`](#9-fieldsort)
35+
- [10. Descriptor types `class` -\> `struct`](#10-descriptor-types-class---struct)
36+
37+
### Breaking changes
38+
39+
#### 1. Container types
2340

2441
**Impact**: High.
2542

@@ -50,7 +67,7 @@ new SearchRequest
5067
};
5168
```
5269

53-
### 2. Removal of certain generic request descriptors
70+
#### 2. Removal of certain generic request descriptors
5471

5572
**Impact**: High.
5673

@@ -109,7 +126,7 @@ List of affected descriptors:
109126
- `TokenizationConfigDescriptor<TDocument>`
110127
- `UpdateDataFrameAnalyticsRequestDescriptor<TDocument>`
111128

112-
### 3. Removal of certain descriptor constructors and related request APIs
129+
#### 3. Removal of certain descriptor constructors and related request APIs
113130

114131
**Impact**: High.
115132

@@ -142,53 +159,53 @@ new IndexRequestDescriptor(document, "my_index", Id.From(document));
142159
await client.IndexAsync(document, "my_index", Id.From(document), ...);
143160
```
144161

145-
### 4. Date / Time / Duration values
162+
#### 4. Date / Time / Duration values
146163

147164
**Impact**: High.
148165

149166
In places where previously `long` or `double` was used to represent a date/time/duration value, `DateTimeOffset` or `TimeSpan` is now used instead.
150167

151-
### 5. `ExtendedBounds`
168+
#### 5. `ExtendedBounds`
152169

153170
**Impact**: High.
154171

155172
Removed `ExtendedBoundsDate`/`ExtendedBoundsDateDescriptor`, `ExtendedBoundsFloat`/`ExtendedBoundsFloatDescriptor`.
156173

157174
Replaced by `ExtendedBounds<T>`, `ExtendedBoundsOfFieldDateMathDescriptor`, and `ExtendedBoundsOfDoubleDescriptor`.
158175

159-
### 6. `Field.Format`
176+
#### 6. `Field.Format`
160177

161178
**Impact**: Low.
162179

163180
Removed `Field.Format` property and corresponding constructor and inferrer overloads.
164181

165182
This property has not been used for some time (replaced by the `FieldAndFormat` type).
166183

167-
### 7. `Field`/`Fields` semantics
184+
#### 7. `Field`/`Fields` semantics
168185

169186
**Impact**: Low.
170187

171188
`Field`/`Fields` static factory methods and conversion operators no longer return nullable references but throw exceptions instead (`Field`) if the input `string`/`Expression`/`PropertyInfo` argument is `null`.
172189

173190
This makes implicit conversions to `Field` more user-friendly without requiring the null-forgiveness operator (`!`) ([read more](index.md#field-name-inference)).
174191

175-
### 8. `FieldValue`
192+
#### 8. `FieldValue`
176193

177194
**Impact**: Low.
178195

179196
Removed `FieldValue.IsLazyDocument`, `FieldValue.IsComposite`, and the corresponding members in the `FieldValue.ValueKind` enum.
180197

181198
These values have not been used for some time.
182199

183-
### 9. `FieldSort`
200+
#### 9. `FieldSort`
184201

185202
**Impact**: Low.
186203

187204
Removed static `FieldSort.Empty` member.
188205

189206
Sorting got reworked which makes this member obsolete ([read more](index.md#sorting)).
190207

191-
### 10. Descriptor types `class` -> `struct`
208+
#### 10. Descriptor types `class` -> `struct`
192209

193210
**Impact**: Low.
194211

docs/release-notes/index.md

Lines changed: 44 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -22,13 +22,37 @@ To check for security updates, go to [Security announcements for the Elastic sta
2222

2323
## 9.0.0 [elasticsearch-net-client-900-release-notes]
2424

25-
### 1. Request Method/API Changes
26-
27-
#### 1.1. Synchronous Request APIs
25+
### Overview
26+
27+
- [1. Request Method/API Changes](#1-request-methodapi-changes)
28+
- [1.1. Synchronous Request APIs](#11-synchronous-request-apis)
29+
- [1.2. Separate Type Arguments for Request/Response](#12-separate-type-arguments-for-requestresponse)
30+
- [2. Improved Fluent API](#2-improved-fluent-api)
31+
- [2.1. `ICollection<E>`](#21-icollectione)
32+
- [2.2. `IDictionary<K, V>`](#22-idictionaryk-v)
33+
- [2.3. `ICollection<KeyValuePair<K, V>>`](#23-icollectionkeyvaluepairk-v)
34+
- [2.4. Union Types](#24-union-types)
35+
- [3. Improved Descriptor Design](#3-improved-descriptor-design)
36+
- [3.1. Wrap](#31-wrap)
37+
- [3.2. Unwrap / Inspect](#32-unwrap--inspect)
38+
- [3.3. Removal of Side Effects](#33-removal-of-side-effects)
39+
- [4. Request Path Parameter Properties](#4-request-path-parameter-properties)
40+
- [5. Field Name Inference](#5-field-name-inference)
41+
- [6. Uniform Date/Time/Duration Types](#6-uniform-datetimeduration-types)
42+
- [7. Improved Container Design](#7-improved-container-design)
43+
- [8. Sorting](#8-sorting)
44+
- [9. Safer Object Creation](#9-safer-object-creation)
45+
- [10. Serialization](#10-serialization)
46+
47+
### Features and enhancements
48+
49+
#### 1. Request Method/API Changes
50+
51+
##### 1.1. Synchronous Request APIs
2852

2953
Synchronous request APIs are no longer marked as `obsolete`. We received some feedback about this deprecation and decided to revert it.
3054

31-
#### 1.2. Separate Type Arguments for Request/Response
55+
##### 1.2. Separate Type Arguments for Request/Response
3256

3357
It is now possible to specify separate type arguments for requests/responses when executing request methods:
3458

@@ -44,13 +68,13 @@ var documents = response.Documents; <1>
4468

4569
The regular APIs with merged type arguments are still available.
4670

47-
### 2. Improved Fluent API
71+
#### 2. Improved Fluent API
4872

4973
The enhanced fluent API generation is likely the most notable change in the 9.0 client.
5074

5175
This section describes the main syntax constructs generated based on the type of the property in the corresponding object.
5276

53-
#### 2.1. `ICollection<E>`
77+
##### 2.1. `ICollection<E>`
5478

5579
Note: This syntax already existed in 8.x.
5680

@@ -66,7 +90,7 @@ new SearchRequestDescriptor<Person>()
6690
);
6791
```
6892

69-
#### 2.2. `IDictionary<K, V>`
93+
##### 2.2. `IDictionary<K, V>`
7094

7195
The 9.0 client introduces full fluent API support for dictionary types.
7296

@@ -122,7 +146,7 @@ new CompletionSuggesterDescriptor<Person>()
122146
);
123147
```
124148

125-
#### 2.3. `ICollection<KeyValuePair<K, V>>`
149+
##### 2.3. `ICollection<KeyValuePair<K, V>>`
126150

127151
Elasticsearch often uses `ICollection<KeyValuePair<K, V>>` types for ordered dictionaries.
128152

@@ -139,7 +163,7 @@ new PutMappingRequestDescriptor<Person>("index")
139163
.AddDynamicTemplate("key", x => x.Runtime(x => x.Format("123"))); // Fluent: Key + Value.
140164
```
141165

142-
#### 2.4. Union Types
166+
##### 2.4. Union Types
143167

144168
Fluent syntax is now as well available for all auto-generated union- and variant-types.
145169

@@ -154,13 +178,13 @@ new TermsQueryDescriptor()
154178
1. `ICollection<FieldValue>`
155179
2. `TermsLookup`
156180

157-
### 3. Improved Descriptor Design
181+
#### 3. Improved Descriptor Design
158182

159183
The 9.0 release features a completely overhauled descriptor design.
160184

161185
Descriptors now wrap the object representation. This brings several internal quality-of-life improvements as well as noticeable benefits to end-users.
162186

163-
#### 3.1. Wrap
187+
##### 3.1. Wrap
164188

165189
Use the wrap constructor to create a new descriptor for an existing object:
166190

@@ -179,7 +203,7 @@ Descriptors are now implemented as `struct` instead of `class`, reducing allocat
179203

180204
:::
181205

182-
#### 3.2. Unwrap / Inspect
206+
##### 3.2. Unwrap / Inspect
183207

184208
Descriptor values can now be inspected by unwrapping the object using an implicit conversion operator:
185209

@@ -192,13 +216,13 @@ SearchRequest request = descriptor;
192216

193217
Unwrapping does not allocate or copy.
194218

195-
#### 3.3. Removal of Side Effects
219+
##### 3.3. Removal of Side Effects
196220

197221
In 8.x, execution of (most but not all) lambda actions passed to descriptors was deferred until the actual request was made. It was never clear to the user when, and how often an action would be executed.
198222

199223
In 9.0, descriptor actions are always executed immediately. This ensures no unforeseen side effects occur if the user-provided lambda action mutates external state (it is still recommended to exclusively use pure/invariant actions). Consequently, the effects of all changes performed by a descriptor method are immediately applied to the wrapped object.
200224

201-
### 4. Request Path Parameter Properties
225+
#### 4. Request Path Parameter Properties
202226

203227
In 8.x, request path parameters like `Index`, `Id`, etc. could only be set by calling the corresponding constructor of the request. Afterwards, there was no way to read or change the current value.
204228

@@ -214,7 +238,7 @@ var indices = request.Indices;
214238
request.Indices = "my_index";
215239
```
216240

217-
### 5. Field Name Inference
241+
#### 5. Field Name Inference
218242

219243
The `Field` type and especially its implicit conversion operations allowed for `null` return values. This led to a poor developer experience, as the null-forgiveness operator (`!`) had to be used frequently without good reason.
220244

@@ -228,7 +252,7 @@ Field field = "field"!;
228252
Field field = "field";
229253
```
230254

231-
### 6. Uniform Date/Time/Duration Types
255+
#### 6. Uniform Date/Time/Duration Types
232256

233257
The encoding of date, time and duration values in Elasticsearch often varies depending on the context. In addition to string representations in ISO 8601 and RFC 3339 format (always UTC), also Unix timestamps (in seconds, milliseconds, nanoseconds) or simply seconds, milliseconds, nanoseconds are frequently used.
234258

@@ -242,7 +266,7 @@ There are some places where the Elasticsearch custom date/time/duration types ar
242266

243267
:::
244268

245-
### 7. Improved Container Design
269+
#### 7. Improved Container Design
246270

247271
In 8.x, container types like `Query` or `Aggregation` had to be initialized using static factory methods.
248272

@@ -284,7 +308,7 @@ Consecutive assignments of variant properties (e.g., first setting `Max`, then `
284308

285309
:::
286310

287-
### 8. Sorting
311+
#### 8. Sorting
288312

289313
Applying a sort order to a search request using the fluent API is now more convenient:
290314

@@ -325,7 +349,7 @@ new SearchRequestDescriptor<Person>()
325349
);
326350
```
327351

328-
### 9. Safer Object Creation
352+
#### 9. Safer Object Creation
329353

330354
In version 9.0, users are better guided to correctly initialize objects and thus prevent invalid requests.
331355

@@ -339,7 +363,7 @@ Please note that the use of descriptors still provides the chance to create inco
339363

340364
:::
341365

342-
### 10. Serialization
366+
#### 10. Serialization
343367

344368
Serialization in version 9.0 has been completely overhauled, with a primary focus on robustness and performance. Additionally, initial milestones have been set for future support of native AOT.
345369

0 commit comments

Comments
 (0)