Class KeywordMarkerTokenFilter.Builder

All Implemented Interfaces:
WithJson<KeywordMarkerTokenFilter.Builder>, ObjectBuilder<KeywordMarkerTokenFilter>
Enclosing class:
KeywordMarkerTokenFilter

public static class KeywordMarkerTokenFilter.Builder extends TokenFilterBase.AbstractBuilder<KeywordMarkerTokenFilter.Builder> implements ObjectBuilder<KeywordMarkerTokenFilter>
  • Constructor Details

    • Builder

      public Builder()
  • Method Details

    • ignoreCase

      public final KeywordMarkerTokenFilter.Builder ignoreCase(@Nullable Boolean value)
      If true, matching for the keywords and keywords_path parameters ignores letter case. Defaults to false.

      API name: ignore_case

    • keywords

      public final KeywordMarkerTokenFilter.Builder keywords(List<String> list)
      Array of keywords. Tokens that match these keywords are not stemmed. This parameter, keywords_path, or keywords_pattern must be specified. You cannot specify this parameter and keywords_pattern.

      API name: keywords

      Adds all elements of list to keywords.

    • keywords

      public final KeywordMarkerTokenFilter.Builder keywords(String value, String... values)
      Array of keywords. Tokens that match these keywords are not stemmed. This parameter, keywords_path, or keywords_pattern must be specified. You cannot specify this parameter and keywords_pattern.

      API name: keywords

      Adds one or more values to keywords.

    • keywordsPath

      public final KeywordMarkerTokenFilter.Builder keywordsPath(@Nullable String value)
      Path to a file that contains a list of keywords. Tokens that match these keywords are not stemmed. This path must be absolute or relative to the config location, and the file must be UTF-8 encoded. Each word in the file must be separated by a line break. This parameter, keywords, or keywords_pattern must be specified. You cannot specify this parameter and keywords_pattern.

      API name: keywords_path

    • keywordsPattern

      public final KeywordMarkerTokenFilter.Builder keywordsPattern(@Nullable String value)
      Java regular expression used to match tokens. Tokens that match this expression are marked as keywords and not stemmed. This parameter, keywords, or keywords_path must be specified. You cannot specify this parameter and keywords or keywords_pattern.

      API name: keywords_pattern

    • self

      Specified by:
      self in class TokenFilterBase.AbstractBuilder<KeywordMarkerTokenFilter.Builder>
    • build

      public KeywordMarkerTokenFilter build()
      Specified by:
      build in interface ObjectBuilder<KeywordMarkerTokenFilter>
      Throws:
      NullPointerException - if some of the required fields are null.