Class KeepTokenFilter

java.lang.Object
com.azure.search.documents.indexes.models.TokenFilter
com.azure.search.documents.indexes.models.KeepTokenFilter

public final class KeepTokenFilter extends TokenFilter
A token filter that only keeps tokens with text contained in a specified list of words. This token filter is implemented using Apache Lucene.
  • Constructor Details

    • KeepTokenFilter

      public KeepTokenFilter(String name, List<String> keepWords)
      Constructor of TokenFilter.
      Parameters:
      name - The name of the token filter. It must only contain letters, digits, spaces, dashes or underscores, can only start and end with alphanumeric characters, and is limited to 128 characters.
      keepWords - The list of words to keep.
  • Method Details

    • getKeepWords

      public List<String> getKeepWords()
      Get the keepWords property: The list of words to keep.
      Returns:
      the keepWords value.
    • areLowerCaseKeepWords

      public Boolean areLowerCaseKeepWords()
      Get the lowerCaseKeepWords property: A value indicating whether to lower case all words first. Default is false.
      Returns:
      the lowerCaseKeepWords value.
    • setLowerCaseKeepWords

      public KeepTokenFilter setLowerCaseKeepWords(Boolean lowerCaseKeepWords)
      Set the lowerCaseKeepWords property: A value indicating whether to lower case all words first. Default is false.
      Parameters:
      lowerCaseKeepWords - the lowerCaseKeepWords value to set.
      Returns:
      the KeepTokenFilter object itself.