Class CompoundWordTokenFilterBase

java.lang.Object
co.elastic.clients.elasticsearch._types.analysis.TokenFilterBase
co.elastic.clients.elasticsearch._types.analysis.CompoundWordTokenFilterBase
All Implemented Interfaces:
JsonpSerializable
Direct Known Subclasses:
DictionaryDecompounderTokenFilter, HyphenationDecompounderTokenFilter

public abstract class CompoundWordTokenFilterBase extends TokenFilterBase
See Also:
  • Constructor Details

  • Method Details

    • maxSubwordSize

      @Nullable public final Integer maxSubwordSize()
      Maximum subword character length. Longer subword tokens are excluded from the output. Defaults to 15.

      API name: max_subword_size

    • minSubwordSize

      @Nullable public final Integer minSubwordSize()
      Minimum subword character length. Shorter subword tokens are excluded from the output. Defaults to 2.

      API name: min_subword_size

    • minWordSize

      @Nullable public final Integer minWordSize()
      Minimum word character length. Shorter word tokens are excluded from the output. Defaults to 5.

      API name: min_word_size

    • onlyLongestMatch

      @Nullable public final Boolean onlyLongestMatch()
      If true, only include the longest matching subword. Defaults to false.

      API name: only_longest_match

    • wordList

      public final List<String> wordList()
      A list of subwords to look for in the token stream. If found, the subword is included in the token output. Either this parameter or word_list_path must be specified.

      API name: word_list

    • wordListPath

      @Nullable public final String wordListPath()
      Path to a file that contains a list of subwords to find in the token stream. If found, the subword is included in the token output. This path must be absolute or relative to the config location, and the file must be UTF-8 encoded. Each token in the file must be separated by a line break. Either this parameter or word_list must be specified.

      API name: word_list_path

    • serializeInternal

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

      protected static <BuilderT extends CompoundWordTokenFilterBase.AbstractBuilder<BuilderT>> void setupCompoundWordTokenFilterBaseDeserializer(ObjectDeserializer<BuilderT> op)