Release notes v8.0.4
editRelease notes v8.0.4
editBug fixes
editBreaking changes
editIn 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.
IndexSettingsAnalysis
editCode-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
Analyzerproperty is now pluralized and renamed toAnalyzersto align with NEST and make it clearer that this can contain more than one analyzer definition. -
The
CharFilterproperty is now pluralized and renamed toCharFiltersto align with NEST and make it clearer that this can contain more than one char filter definition. Its type has changes from aIDictionary<string, Elastic.Clients.Elasticsearch.Analysis.CharFilter>toCharFilters, a tagged union type deriving from IsADictionary<string, ICharFilter>`. -
The
Filterproperty is now pluralized and renamed toTokenFiltersto align with NEST and make it clearer that this can contain more than one token filter definition. Its type has changes from aIDictionary<string, Elastic.Clients.Elasticsearch.Analysis.TokenFilter>toTokenFilters, a tagged union type deriving from IsADictionary<string, ITokenFilter>`. -
The
Normalizerproperty is now pluralized and renamed toNormalizersto align with NEST and make it clearer that this can contain more than one normalizer definition. -
The
Tokenizerproperty is now pluralized and renamed toTokenizersto align with NEST and make it clearer that this can contain more than one tokenizer definition. Its type has changes from aIDictionary<string, Elastic.Clients.Elasticsearch.Analysis.Tokenizer>toTokenFilters, a tagged union type deriving from IsADictionary<string, ITokenizer>`.
Before
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
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.
Example usage of updated fluent syntax:
editvar 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")))));
Token Filters
editToken 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.
Character Filters
editCharacter 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.
Tokenizers
editTokenizer 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.
IndexManagement.StorageType
editThe 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.