Skip to content

Commit f154fc4

Browse files
Add release notes for 8.0.4 (#7128) (#7160)
* Add release notes for 8.0.4 * Tweak formatting * Add additional PR to list of bug fixes * Add breaking change notification for StorageType Co-authored-by: Steve Gordon <[email protected]>
1 parent 60b567b commit f154fc4

File tree

3 files changed

+144
-2
lines changed

3 files changed

+144
-2
lines changed

docs/release-notes/breaking-change-policy.asciidoc

+3-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,9 @@ This section explains how these breaking changes are considered for inclusion in
1212

1313
Some issues in the API specification are properties that have an incorrect type, such as a `long` that should be a `string`, or a required property that is actually optional. These issues can cause the {net-client} to not work properly or even throw exceptions.
1414

15-
When a specification issue is discovered and resolved, it may require code updates in applications using the {net-client}. Such breaking changes are considered acceptable, _even in patch releases_ (e.g. 7.17.0 -> 7.17.1), as they introduce stability to APIs that may otherwise be unusable.
15+
When a specification issue is discovered and resolved, it may require code updates in applications using the {net-client}. Such breaking changes are considered acceptable, _even in patch releases_ (e.g. 8.0.0 -> 8.0.1), as they introduce stability to APIs that may otherwise be unusable.
16+
17+
We may also make breaking changes in patch releases to correct design flaws and code-generation issues that we deem beneficial to resolve at the earliest oppotunity. We will detail these in the relevant release notes and limit these as the client matures.
1618

1719
[discrete]
1820
==== Breaking changes in minor releases
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,138 @@
1+
[[release-notes-8.0.4]]
2+
== Release notes v8.0.4
3+
4+
[discrete]
5+
=== Bug fixes
6+
7+
- Fix code-gen for IndexSettingsAnalysis (issue:
8+
https://github.com/elastic/elasticsearch-net/issues/7118[#7118])
9+
- Complete implementation of Metrics type
10+
- Update generated code with fixes from 8.6 specification (issue:
11+
https://github.com/elastic/elasticsearch-net/issues/7119[#7119]). Adds `Missing`
12+
property to `MultiTermLookup`.
13+
14+
[discrete]
15+
=== Breaking changes
16+
17+
In the course of fixing the code-generation of types used on `IndexSettingsAnalysis`,
18+
several breaking changes were introduced. Some of these were necessary to make the
19+
types usable, while others fixed the consistency of the generated code.
20+
21+
[discrete]
22+
==== IndexSettingsAnalysis
23+
24+
Code-generation has been updated to apply transforms to fix the specification
25+
of the `IndexSettingsAnalysis` type. As a result, all properties have been renamed,
26+
and some property types have been changed.
27+
28+
* The `Analyzer` property is now pluralized and renamed to `Analyzers` to align with
29+
NEST and make it clearer that this can contain more than one analyzer definition.
30+
* The `CharFilter` property is now pluralized and renamed to `CharFilters` to align with
31+
NEST and make it clearer that this can contain more than one char filter definition.
32+
Its type has changes from a `IDictionary<string, Elastic.Clients.Elasticsearch.Analysis.CharFilter>`
33+
to `CharFilters`, a tagged union type deriving from IsADictionary<string, ICharFilter>`.
34+
* The `Filter` property is now pluralized and renamed to `TokenFilters` to align with
35+
NEST and make it clearer that this can contain more than one token filter definition.
36+
Its type has changes from a `IDictionary<string, Elastic.Clients.Elasticsearch.Analysis.TokenFilter>`
37+
to `TokenFilters`, a tagged union type deriving from IsADictionary<string, ITokenFilter>`.
38+
* The `Normalizer` property is now pluralized and renamed to `Normalizers` to align with
39+
NEST and make it clearer that this can contain more than one normalizer definition.
40+
* The `Tokenizer` property is now pluralized and renamed to `Tokenizers` to align with
41+
NEST and make it clearer that this can contain more than one tokenizer definition.
42+
Its type has changes from a `IDictionary<string, Elastic.Clients.Elasticsearch.Analysis.Tokenizer>`
43+
to `TokenFilters`, a tagged union type deriving from IsADictionary<string, ITokenizer>`.
44+
45+
*_Before_*
46+
47+
[source,csharp]
48+
----
49+
public sealed partial class IndexSettingsAnalysis
50+
{
51+
public Elastic.Clients.Elasticsearch.Analysis.Analyzers? Analyzer { get; set; }
52+
public IDictionary<string, Elastic.Clients.Elasticsearch.Analysis.CharFilter>? CharFilter { get; set; }
53+
public IDictionary<string, Elastic.Clients.Elasticsearch.Analysis.TokenFilter>? Filter { get; set; }
54+
public Elastic.Clients.Elasticsearch.Analysis.Normalizers? Normalizer { get; set; }
55+
public IDictionary<string, Elastic.Clients.Elasticsearch.Analysis.Tokenizer>? Tokenizer { get; set; }
56+
}
57+
----
58+
59+
*_After_*
60+
61+
[source,csharp]
62+
----
63+
public sealed partial class IndexSettingsAnalysis
64+
{
65+
public Elastic.Clients.Elasticsearch.Analysis.Analyzers? Analyzers { get; set; }
66+
public Elastic.Clients.Elasticsearch.Analysis.CharFilters? CharFilters { get; set; }
67+
public Elastic.Clients.Elasticsearch.Analysis.TokenFilters? TokenFilters { get; set; }
68+
public Elastic.Clients.Elasticsearch.Analysis.Normalizers? Normalizers { get; set; }
69+
public Elastic.Clients.Elasticsearch.Analysis.Tokenizers? Tokenizers { get; set; }
70+
}
71+
----
72+
73+
The `IndexSettingsAnalysisDescriptor` type has been updated accordingly to apply
74+
the above changes. It now supports a more convenient syntax to easily define
75+
the filters, normalizers and tokenizers that apply to the settings for indices.
76+
77+
[discrete]
78+
===== Example usage of updated fluent syntax:
79+
80+
[source,csharp]
81+
----
82+
var descriptor = new CreateIndexRequestDescriptor("test")
83+
.Settings(s => s
84+
.Analysis(a => a
85+
.Analyzers(a => a
86+
.Stop("stop-name", stop => stop.StopwordsPath("analysis/path.txt"))
87+
.Pattern("pattern-name", pattern => pattern.Version("version"))
88+
.Custom("my-custom-analyzer", c => c
89+
.Filter(new[] { "stop", "synonym" })
90+
.Tokenizer("standard")))
91+
.TokenFilters(f => f
92+
.Synonym("synonym", synonym => synonym
93+
.SynonymsPath("analysis/synonym.txt")))));
94+
----
95+
96+
[discrete]
97+
==== Token Filters
98+
99+
Token filter types now implement the `ITokenFilter` interface, rather than
100+
`ITokenFilterDefinition`.
101+
102+
The `TokenFilter` union type has been renamed to `CategorizationTokenFilter` to
103+
clearly signify it's use only within ML categorization contexts.
104+
105+
A `TokenFilters` type has been introduced, which derives from `IsADictionary` and
106+
supports convenient addition of known token filters via the fluent API.
107+
108+
[discrete]
109+
==== Character Filters
110+
111+
Character filter types now implement the `ICharFilter` interface, rather than
112+
`ICharFilterDefinition`.
113+
114+
The `CharFilter` union type has been renamed to `CategorizationCharFilter` to
115+
clearly signify it's use only within ML categorization contexts.
116+
117+
A `CharFilters` type has been introduced, which derives from `IsADictionary` and
118+
supports convenient addition of known character filters via the fluent API.
119+
120+
[discrete]
121+
==== Tokenizers
122+
123+
Tokenizer types now implement the `ITokenizer` interface, rather than
124+
`ITokenizerDefinition`.
125+
126+
The `Tokenizer` union type has been renamed to `CategorizationTokenizer` to
127+
clearly signify it's use only within ML categorization contexts.
128+
129+
A `Tokenizers` type has been introduced, which derives from `IsADictionary` and
130+
supports convenient addition of known tokenizers via the fluent API.
131+
132+
[discrete]
133+
==== IndexManagement.StorageType
134+
135+
The 8.6 specification fixed this type to mark is as a non-exhaustive enum, since
136+
it supports additional values besides those coded into the specification. As a
137+
result the code-generation for this type causes some breaking changes. The type
138+
is no longer generated as an `enum` and is not a custom `readonly struct`.

docs/release-notes/release-notes.asciidoc

+3-1
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,16 @@
44
* <<breaking-changes-policy,Breaking changes policy>>
55

66
[discrete]
7-
== Version 8.x
7+
== Version 8.0
88

9+
* <<release-notes-8.0.4,Release notes v8.0.4>>
910
* <<release-notes-8.0.3,Release notes v8.0.3>>
1011
* <<release-notes-8.0.2,Release notes v8.0.2>>
1112
* <<release-notes-8.0.1,Release notes v8.0.1>>
1213
* <<release-notes-8.0.0,Release notes v8.0.0>>
1314

1415
include::breaking-change-policy.asciidoc[]
16+
include::release-notes-8.0.4.asciidoc[]
1517
include::release-notes-8.0.3.asciidoc[]
1618
include::release-notes-8.0.2.asciidoc[]
1719
include::release-notes-8.0.1.asciidoc[]

0 commit comments

Comments
 (0)