Class CommonGramsTokenFilter

java.lang.Object
co.elastic.clients.elasticsearch._types.analysis.TokenFilterBase
co.elastic.clients.elasticsearch._types.analysis.CommonGramsTokenFilter
All Implemented Interfaces:
TokenFilterDefinitionVariant, JsonpSerializable

@JsonpDeserializable public class CommonGramsTokenFilter extends TokenFilterBase implements TokenFilterDefinitionVariant
See Also:
  • Field Details

  • Method Details

    • of

    • _tokenFilterDefinitionKind

      public TokenFilterDefinition.Kind _tokenFilterDefinitionKind()
      TokenFilterDefinition variant kind.
      Specified by:
      _tokenFilterDefinitionKind in interface TokenFilterDefinitionVariant
    • commonWords

      public final List<String> commonWords()
      A list of tokens. The filter generates bigrams for these tokens. Either this or the common_words_path parameter is required.

      API name: common_words

    • commonWordsPath

      @Nullable public final String commonWordsPath()
      Path to a file containing a list of tokens. The filter generates bigrams for these tokens. This path must be absolute or relative to the config location. The file must be UTF-8 encoded. Each token in the file must be separated by a line break. Either this or the common_words parameter is required.

      API name: common_words_path

    • ignoreCase

      @Nullable public final Boolean ignoreCase()
      If true, matches for common words matching are case-insensitive. Defaults to false.

      API name: ignore_case

    • queryMode

      @Nullable public final Boolean queryMode()
      If true, the filter excludes the following tokens from the output:
      • Unigrams for common words
      • Unigrams for terms followed by common words Defaults to false. We recommend enabling this parameter for search analyzers.

      API name: query_mode

    • serializeInternal

      protected void serializeInternal(jakarta.json.stream.JsonGenerator generator, JsonpMapper mapper)
      Overrides:
      serializeInternal in class TokenFilterBase
    • setupCommonGramsTokenFilterDeserializer

      protected static void setupCommonGramsTokenFilterDeserializer(ObjectDeserializer<CommonGramsTokenFilter.Builder> op)