From a36e34ef6c203e19727031806084381495c43e57 Mon Sep 17 00:00:00 2001 From: Steve Gordon Date: Wed, 21 Dec 2022 14:58:34 +0000 Subject: [PATCH] Add release notes for 8.0.4 (#7128) * Add release notes for 8.0.4 * Tweak formatting * Add additional PR to list of bug fixes * Add breaking change notification for StorageType --- .../breaking-change-policy.asciidoc | 4 +- .../release-notes-8.0.4.asciidoc | 138 ++++++++++++++++++ docs/release-notes/release-notes.asciidoc | 4 +- 3 files changed, 144 insertions(+), 2 deletions(-) create mode 100644 docs/release-notes/release-notes-8.0.4.asciidoc diff --git a/docs/release-notes/breaking-change-policy.asciidoc b/docs/release-notes/breaking-change-policy.asciidoc index 7e1eb4873b2..74138bc005f 100644 --- a/docs/release-notes/breaking-change-policy.asciidoc +++ b/docs/release-notes/breaking-change-policy.asciidoc @@ -12,7 +12,9 @@ This section explains how these breaking changes are considered for inclusion in 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. -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. +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. + +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. [discrete] ==== Breaking changes in minor releases diff --git a/docs/release-notes/release-notes-8.0.4.asciidoc b/docs/release-notes/release-notes-8.0.4.asciidoc new file mode 100644 index 00000000000..ac61771ebde --- /dev/null +++ b/docs/release-notes/release-notes-8.0.4.asciidoc @@ -0,0 +1,138 @@ +[[release-notes-8.0.4]] +== Release notes v8.0.4 + +[discrete] +=== Bug fixes + +- Fix code-gen for IndexSettingsAnalysis (issue: +https://github.com/elastic/elasticsearch-net/issues/7118[#7118]) +- Complete implementation of Metrics type +- Update generated code with fixes from 8.6 specification (issue: +https://github.com/elastic/elasticsearch-net/issues/7119[#7119]). Adds `Missing` +property to `MultiTermLookup`. + +[discrete] +=== Breaking changes + +In the course of fixing the code-generation of types used on `IndexSettingsAnalysis`, +several breaking changes were introduced. Some of these were necessary to make the +types usable, while others fixed the consistency of the generated code. + +[discrete] +==== IndexSettingsAnalysis + +Code-generation has been updated to apply transforms to fix the specification +of the `IndexSettingsAnalysis` type. As a result, all properties have been renamed, +and some property types have been changed. + +* The `Analyzer` property is now pluralized and renamed to `Analyzers` to align with +NEST and make it clearer that this can contain more than one analyzer definition. +* The `CharFilter` property is now pluralized and renamed to `CharFilters` to align with +NEST and make it clearer that this can contain more than one char filter definition. +Its type has changes from a `IDictionary` +to `CharFilters`, a tagged union type deriving from IsADictionary`. +* The `Filter` property is now pluralized and renamed to `TokenFilters` to align with +NEST and make it clearer that this can contain more than one token filter definition. +Its type has changes from a `IDictionary` +to `TokenFilters`, a tagged union type deriving from IsADictionary`. +* The `Normalizer` property is now pluralized and renamed to `Normalizers` to align with +NEST and make it clearer that this can contain more than one normalizer definition. +* The `Tokenizer` property is now pluralized and renamed to `Tokenizers` to align with +NEST and make it clearer that this can contain more than one tokenizer definition. +Its type has changes from a `IDictionary` +to `TokenFilters`, a tagged union type deriving from IsADictionary`. + +*_Before_* + +[source,csharp] +---- +public sealed partial class IndexSettingsAnalysis +{ + public Elastic.Clients.Elasticsearch.Analysis.Analyzers? Analyzer { get; set; } + public IDictionary? CharFilter { get; set; } + public IDictionary? Filter { get; set; } + public Elastic.Clients.Elasticsearch.Analysis.Normalizers? Normalizer { get; set; } + public IDictionary? Tokenizer { get; set; } +} +---- + +*_After_* + +[source,csharp] +---- +public sealed partial class IndexSettingsAnalysis +{ + public Elastic.Clients.Elasticsearch.Analysis.Analyzers? Analyzers { get; set; } + public Elastic.Clients.Elasticsearch.Analysis.CharFilters? CharFilters { get; set; } + public Elastic.Clients.Elasticsearch.Analysis.TokenFilters? TokenFilters { get; set; } + public Elastic.Clients.Elasticsearch.Analysis.Normalizers? Normalizers { get; set; } + public Elastic.Clients.Elasticsearch.Analysis.Tokenizers? Tokenizers { get; set; } +} +---- + +The `IndexSettingsAnalysisDescriptor` type has been updated accordingly to apply +the above changes. It now supports a more convenient syntax to easily define +the filters, normalizers and tokenizers that apply to the settings for indices. + +[discrete] +===== Example usage of updated fluent syntax: + +[source,csharp] +---- +var descriptor = new CreateIndexRequestDescriptor("test") + .Settings(s => s + .Analysis(a => a + .Analyzers(a => a + .Stop("stop-name", stop => stop.StopwordsPath("analysis/path.txt")) + .Pattern("pattern-name", pattern => pattern.Version("version")) + .Custom("my-custom-analyzer", c => c + .Filter(new[] { "stop", "synonym" }) + .Tokenizer("standard"))) + .TokenFilters(f => f + .Synonym("synonym", synonym => synonym + .SynonymsPath("analysis/synonym.txt"))))); +---- + +[discrete] +==== Token Filters + +Token filter types now implement the `ITokenFilter` interface, rather than +`ITokenFilterDefinition`. + +The `TokenFilter` union type has been renamed to `CategorizationTokenFilter` to +clearly signify it's use only within ML categorization contexts. + +A `TokenFilters` type has been introduced, which derives from `IsADictionary` and +supports convenient addition of known token filters via the fluent API. + +[discrete] +==== Character Filters + +Character filter types now implement the `ICharFilter` interface, rather than +`ICharFilterDefinition`. + +The `CharFilter` union type has been renamed to `CategorizationCharFilter` to +clearly signify it's use only within ML categorization contexts. + +A `CharFilters` type has been introduced, which derives from `IsADictionary` and +supports convenient addition of known character filters via the fluent API. + +[discrete] +==== Tokenizers + +Tokenizer types now implement the `ITokenizer` interface, rather than +`ITokenizerDefinition`. + +The `Tokenizer` union type has been renamed to `CategorizationTokenizer` to +clearly signify it's use only within ML categorization contexts. + +A `Tokenizers` type has been introduced, which derives from `IsADictionary` and +supports convenient addition of known tokenizers via the fluent API. + +[discrete] +==== IndexManagement.StorageType + +The 8.6 specification fixed this type to mark is as a non-exhaustive enum, since +it supports additional values besides those coded into the specification. As a +result the code-generation for this type causes some breaking changes. The type +is no longer generated as an `enum` and is not a custom `readonly struct`. \ No newline at end of file diff --git a/docs/release-notes/release-notes.asciidoc b/docs/release-notes/release-notes.asciidoc index 00dd1de7df3..520c4337d74 100644 --- a/docs/release-notes/release-notes.asciidoc +++ b/docs/release-notes/release-notes.asciidoc @@ -4,14 +4,16 @@ * <> [discrete] -== Version 8.x +== Version 8.0 +* <> * <> * <> * <> * <> include::breaking-change-policy.asciidoc[] +include::release-notes-8.0.4.asciidoc[] include::release-notes-8.0.3.asciidoc[] include::release-notes-8.0.2.asciidoc[] include::release-notes-8.0.1.asciidoc[]