Skip to content

[Backport 8.3] Add release notes for 8.0.4 #7157

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Dec 21, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion docs/release-notes/breaking-change-policy.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
138 changes: 138 additions & 0 deletions docs/release-notes/release-notes-8.0.4.asciidoc
Original file line number Diff line number Diff line change
@@ -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<string, Elastic.Clients.Elasticsearch.Analysis.CharFilter>`
to `CharFilters`, a tagged union type deriving from IsADictionary<string, ICharFilter>`.
* 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<string, Elastic.Clients.Elasticsearch.Analysis.TokenFilter>`
to `TokenFilters`, a tagged union type deriving from IsADictionary<string, ITokenFilter>`.
* 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<string, Elastic.Clients.Elasticsearch.Analysis.Tokenizer>`
to `TokenFilters`, a tagged union type deriving from IsADictionary<string, ITokenizer>`.

*_Before_*

[source,csharp]
----
public sealed partial class IndexSettingsAnalysis
{
public Elastic.Clients.Elasticsearch.Analysis.Analyzers? Analyzer { get; set; }
public IDictionary<string, Elastic.Clients.Elasticsearch.Analysis.CharFilter>? CharFilter { get; set; }
public IDictionary<string, Elastic.Clients.Elasticsearch.Analysis.TokenFilter>? Filter { get; set; }
public Elastic.Clients.Elasticsearch.Analysis.Normalizers? Normalizer { get; set; }
public IDictionary<string, Elastic.Clients.Elasticsearch.Analysis.Tokenizer>? 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`.
4 changes: 3 additions & 1 deletion docs/release-notes/release-notes.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,16 @@
* <<breaking-changes-policy,Breaking changes policy>>

[discrete]
== Version 8.x
== Version 8.0

* <<release-notes-8.0.4,Release notes v8.0.4>>
* <<release-notes-8.0.3,Release notes v8.0.3>>
* <<release-notes-8.0.2,Release notes v8.0.2>>
* <<release-notes-8.0.1,Release notes v8.0.1>>
* <<release-notes-8.0.0,Release notes v8.0.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[]
Expand Down