Class ElisionTokenFilter.Builder

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

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

    • Builder

      public Builder()
  • Method Details

    • articles

      public final ElisionTokenFilter.Builder articles(List<String> list)
      List of elisions to remove. To be removed, the elision must be at the beginning of a token and be immediately followed by an apostrophe. Both the elision and apostrophe are removed. For custom elision filters, either this parameter or articles_path must be specified.

      API name: articles

      Adds all elements of list to articles.

    • articles

      public final ElisionTokenFilter.Builder articles(String value, String... values)
      List of elisions to remove. To be removed, the elision must be at the beginning of a token and be immediately followed by an apostrophe. Both the elision and apostrophe are removed. For custom elision filters, either this parameter or articles_path must be specified.

      API name: articles

      Adds one or more values to articles.

    • articlesPath

      public final ElisionTokenFilter.Builder articlesPath(@Nullable String value)
      Path to a file that contains a list of elisions to remove. This path must be absolute or relative to the config location, and the file must be UTF-8 encoded. Each elision in the file must be separated by a line break. To be removed, the elision must be at the beginning of a token and be immediately followed by an apostrophe. Both the elision and apostrophe are removed. For custom elision filters, either this parameter or articles must be specified.

      API name: articles_path

    • articlesCase

      public final ElisionTokenFilter.Builder articlesCase(@Nullable Boolean value)
      If true, elision matching is case insensitive. If false, elision matching is case sensitive. Defaults to false.

      API name: articles_case

    • self

      protected ElisionTokenFilter.Builder self()
      Specified by:
      self in class TokenFilterBase.AbstractBuilder<ElisionTokenFilter.Builder>
    • build

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