Skip to content

Commit fad6877

Browse files
committed
Address 9.0-preview feedback
1 parent 4883723 commit fad6877

13 files changed

+652
-32
lines changed

docs/release-notes/breaking-changes.md

+37-10
Original file line numberDiff line numberDiff line change
@@ -23,16 +23,20 @@ Breaking changes can impact your Elastic applications, potentially disrupting no
2323

2424
### Overview
2525

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)
26+
- [Elasticsearch .NET Client breaking changes \[elasticsearch-net-client-breaking-changes\]](#elasticsearch-net-client-breaking-changes-elasticsearch-net-client-breaking-changes)
27+
- [9.0.0 \[elasticsearch-net-client-900-breaking-changes\]](#900-elasticsearch-net-client-900-breaking-changes)
28+
- [Overview](#overview)
29+
- [Breaking changes](#breaking-changes)
30+
- [1. Container types \[1-container-types\]](#1-container-types-1-container-types)
31+
- [2. Removal of certain generic request descriptors \[2-removal-of-certain-generic-request-descriptors\]](#2-removal-of-certain-generic-request-descriptors-2-removal-of-certain-generic-request-descriptors)
32+
- [3. Removal of certain descriptor constructors and related request APIs \[3-removal-of-certain-descriptor-constructors-and-related-request-apis\]](#3-removal-of-certain-descriptor-constructors-and-related-request-apis-3-removal-of-certain-descriptor-constructors-and-related-request-apis)
33+
- [4. Date / Time / Duration values \[4-date-time-duration-values\]](#4-date--time--duration-values-4-date-time-duration-values)
34+
- [5. `ExtendedBounds` \[5-extendedbounds\]](#5-extendedbounds-5-extendedbounds)
35+
- [6. `Field.Format` \[6-fieldformat\]](#6-fieldformat-6-fieldformat)
36+
- [7. `Field`/`Fields` semantics \[7-fieldfields-semantics\]](#7-fieldfields-semantics-7-fieldfields-semantics)
37+
- [8. `FieldValue` \[8-fieldvalue\]](#8-fieldvalue-8-fieldvalue)
38+
- [9. `FieldSort` \[9-fieldsort\]](#9-fieldsort-9-fieldsort)
39+
- [10. Descriptor types `class` -\> `struct` \[10-descriptor-types-class-struct\]](#10-descriptor-types-class---struct-10-descriptor-types-class-struct)
3640

3741
### Breaking changes
3842

@@ -67,6 +71,19 @@ new SearchRequest
6771
};
6872
```
6973

74+
Previously required methods like e.g. `TryGet<TVariant>(out)` have been removed.
75+
76+
The new recommended way of inspecting container types is to use simple pattern matching:
77+
78+
```csharp
79+
var query = new Query();
80+
81+
if (query.Nested is { } nested)
82+
{
83+
// We have a nested query.
84+
}
85+
```
86+
7087
#### 2. Removal of certain generic request descriptors [2-removal-of-certain-generic-request-descriptors]
7188

7289
**Impact**: High.
@@ -199,6 +216,16 @@ These values have not been used for some time.
199216

200217
#### 9. `FieldSort` [9-fieldsort]
201218

219+
**Impact**: High.
220+
221+
Removed `FieldSort` parameterless constructor.
222+
223+
Please use the new constructor instead:
224+
225+
```csharp
226+
public FieldSort(Elastic.Clients.Elasticsearch.Field field)
227+
```
228+
202229
**Impact**: Low.
203230

204231
Removed static `FieldSort.Empty` member.

docs/release-notes/index.md

+36-19
Original file line numberDiff line numberDiff line change
@@ -24,25 +24,29 @@ To check for security updates, go to [Security announcements for the Elastic sta
2424

2525
### Overview
2626

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

4751
### Features and enhancements
4852

@@ -300,6 +304,19 @@ var agg = new Aggregation
300304
};
301305
```
302306

307+
Previously required methods like e.g. `TryGet<TVariant>(out)` have been removed.
308+
309+
The new recommended way of inspecting container types is to use simple pattern matching:
310+
311+
```csharp
312+
var query = new Query();
313+
314+
if (query.Nested is { } nested)
315+
{
316+
// We have a nested query.
317+
}
318+
```
319+
303320
:::{warning}
304321

305322
A container can still only contain a single variant. Setting multiple variants at once is invalid.

docs/release-notes/known-issues.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,4 +21,4 @@ Known issues are significant defects or limitations that may impact your impleme
2121

2222
:::
2323

24-
_No known issues_
24+
Known issues are tracked on [GitHub](https://github.com/elastic/elasticsearch-net/issues?q=is%3Aissue%20state%3Aopen%20label%3A%22Category%3A%20Bug%22).

src/Elastic.Clients.Elasticsearch/_Generated/Client/ElasticsearchClient.Cluster.g.cs

+16
Original file line numberDiff line numberDiff line change
@@ -388,6 +388,14 @@ public virtual Elastic.Clients.Elasticsearch.Cluster.HealthResponse Health(Elast
388388
return DoRequest<Elastic.Clients.Elasticsearch.Cluster.HealthRequest, Elastic.Clients.Elasticsearch.Cluster.HealthResponse, Elastic.Clients.Elasticsearch.Cluster.HealthRequestParameters>(request);
389389
}
390390

391+
public virtual Elastic.Clients.Elasticsearch.Cluster.HealthResponse Health<TDocument>()
392+
{
393+
var builder = new Elastic.Clients.Elasticsearch.Cluster.HealthRequestDescriptor<TDocument>();
394+
var request = builder.Instance;
395+
request.BeforeRequest();
396+
return DoRequest<Elastic.Clients.Elasticsearch.Cluster.HealthRequest, Elastic.Clients.Elasticsearch.Cluster.HealthResponse, Elastic.Clients.Elasticsearch.Cluster.HealthRequestParameters>(request);
397+
}
398+
391399
public virtual Elastic.Clients.Elasticsearch.Cluster.HealthResponse Health<TDocument>(System.Action<Elastic.Clients.Elasticsearch.Cluster.HealthRequestDescriptor<TDocument>> action)
392400
{
393401
var builder = new Elastic.Clients.Elasticsearch.Cluster.HealthRequestDescriptor<TDocument>();
@@ -446,6 +454,14 @@ public virtual Elastic.Clients.Elasticsearch.Cluster.HealthResponse Health<TDocu
446454
return DoRequestAsync<Elastic.Clients.Elasticsearch.Cluster.HealthRequest, Elastic.Clients.Elasticsearch.Cluster.HealthResponse, Elastic.Clients.Elasticsearch.Cluster.HealthRequestParameters>(request, cancellationToken);
447455
}
448456

457+
public virtual System.Threading.Tasks.Task<Elastic.Clients.Elasticsearch.Cluster.HealthResponse> HealthAsync<TDocument>(System.Threading.CancellationToken cancellationToken = default)
458+
{
459+
var builder = new Elastic.Clients.Elasticsearch.Cluster.HealthRequestDescriptor<TDocument>();
460+
var request = builder.Instance;
461+
request.BeforeRequest();
462+
return DoRequestAsync<Elastic.Clients.Elasticsearch.Cluster.HealthRequest, Elastic.Clients.Elasticsearch.Cluster.HealthResponse, Elastic.Clients.Elasticsearch.Cluster.HealthRequestParameters>(request, cancellationToken);
463+
}
464+
449465
public virtual System.Threading.Tasks.Task<Elastic.Clients.Elasticsearch.Cluster.HealthResponse> HealthAsync<TDocument>(System.Action<Elastic.Clients.Elasticsearch.Cluster.HealthRequestDescriptor<TDocument>> action, System.Threading.CancellationToken cancellationToken = default)
450466
{
451467
var builder = new Elastic.Clients.Elasticsearch.Cluster.HealthRequestDescriptor<TDocument>();

0 commit comments

Comments
 (0)