Class CategorizationAnalyzerDefinition.Builder

java.lang.Object
co.elastic.clients.util.ObjectBuilderBase
co.elastic.clients.elasticsearch.ml.CategorizationAnalyzerDefinition.Builder
All Implemented Interfaces:
ObjectBuilder<CategorizationAnalyzerDefinition>
Enclosing class:
CategorizationAnalyzerDefinition

public static class CategorizationAnalyzerDefinition.Builder
extends ObjectBuilderBase
implements ObjectBuilder<CategorizationAnalyzerDefinition>
  • Constructor Details

    • Builder

      public Builder()
  • Method Details

    • charFilter

      public final CategorizationAnalyzerDefinition.Builder charFilter​(java.util.List<CharFilter> list)
      One or more character filters. In addition to the built-in character filters, other plugins can provide more character filters. If this property is not specified, no character filters are applied prior to categorization. If you are customizing some other aspect of the analyzer and you need to achieve the equivalent of categorization_filters (which are not permitted when some other aspect of the analyzer is customized), add them here as pattern replace character filters.

      API name: char_filter

      Adds all elements of list to charFilter.

    • charFilter

      public final CategorizationAnalyzerDefinition.Builder charFilter​(CharFilter value, CharFilter... values)
      One or more character filters. In addition to the built-in character filters, other plugins can provide more character filters. If this property is not specified, no character filters are applied prior to categorization. If you are customizing some other aspect of the analyzer and you need to achieve the equivalent of categorization_filters (which are not permitted when some other aspect of the analyzer is customized), add them here as pattern replace character filters.

      API name: char_filter

      Adds one or more values to charFilter.

    • charFilter

      public final CategorizationAnalyzerDefinition.Builder charFilter​(java.util.function.Function<CharFilter.Builder,​ObjectBuilder<CharFilter>> fn)
      One or more character filters. In addition to the built-in character filters, other plugins can provide more character filters. If this property is not specified, no character filters are applied prior to categorization. If you are customizing some other aspect of the analyzer and you need to achieve the equivalent of categorization_filters (which are not permitted when some other aspect of the analyzer is customized), add them here as pattern replace character filters.

      API name: char_filter

      Adds a value to charFilter using a builder lambda.

    • filter

      public final CategorizationAnalyzerDefinition.Builder filter​(java.util.List<TokenFilter> list)
      One or more token filters. In addition to the built-in token filters, other plugins can provide more token filters. If this property is not specified, no token filters are applied prior to categorization.

      API name: filter

      Adds all elements of list to filter.

    • filter

      public final CategorizationAnalyzerDefinition.Builder filter​(TokenFilter value, TokenFilter... values)
      One or more token filters. In addition to the built-in token filters, other plugins can provide more token filters. If this property is not specified, no token filters are applied prior to categorization.

      API name: filter

      Adds one or more values to filter.

    • filter

      public final CategorizationAnalyzerDefinition.Builder filter​(java.util.function.Function<TokenFilter.Builder,​ObjectBuilder<TokenFilter>> fn)
      One or more token filters. In addition to the built-in token filters, other plugins can provide more token filters. If this property is not specified, no token filters are applied prior to categorization.

      API name: filter

      Adds a value to filter using a builder lambda.

    • tokenizer

      public final CategorizationAnalyzerDefinition.Builder tokenizer​(@Nullable Tokenizer value)
      The name or definition of the tokenizer to use after character filters are applied. This property is compulsory if categorization_analyzer is specified as an object. Machine learning provides a tokenizer called ml_standard that tokenizes in a way that has been determined to produce good categorization results on a variety of log file formats for logs in English. If you want to use that tokenizer but change the character or token filters, specify "tokenizer": "ml_standard" in your categorization_analyzer. Additionally, the ml_classic tokenizer is available, which tokenizes in the same way as the non-customizable tokenizer in old versions of the product (before 6.2). ml_classic was the default categorization tokenizer in versions 6.2 to 7.13, so if you need categorization identical to the default for jobs created in these versions, specify "tokenizer": "ml_classic" in your categorization_analyzer.

      API name: tokenizer

    • tokenizer

      public final CategorizationAnalyzerDefinition.Builder tokenizer​(java.util.function.Function<Tokenizer.Builder,​ObjectBuilder<Tokenizer>> fn)
      The name or definition of the tokenizer to use after character filters are applied. This property is compulsory if categorization_analyzer is specified as an object. Machine learning provides a tokenizer called ml_standard that tokenizes in a way that has been determined to produce good categorization results on a variety of log file formats for logs in English. If you want to use that tokenizer but change the character or token filters, specify "tokenizer": "ml_standard" in your categorization_analyzer. Additionally, the ml_classic tokenizer is available, which tokenizes in the same way as the non-customizable tokenizer in old versions of the product (before 6.2). ml_classic was the default categorization tokenizer in versions 6.2 to 7.13, so if you need categorization identical to the default for jobs created in these versions, specify "tokenizer": "ml_classic" in your categorization_analyzer.

      API name: tokenizer

    • build

      Specified by:
      build in interface ObjectBuilder<CategorizationAnalyzerDefinition>
      Throws:
      java.lang.NullPointerException - if some of the required fields are null.