Class StopwordsTokenFilter

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

public final class StopwordsTokenFilter extends TokenFilter
Removes stop words from a token stream. This token filter is implemented using Apache Lucene.
  • Constructor Details

    • StopwordsTokenFilter

      public StopwordsTokenFilter(String name)
      Constructor of StopwordsTokenFilter.
      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.
  • Method Details

    • getStopwords

      public List<String> getStopwords()
      Get the stopwords property: The list of stopwords. This property and the stopwords list property cannot both be set.
      Returns:
      the stopwords value.
    • setStopwords

      public StopwordsTokenFilter setStopwords(String... stopwords)
      Set the stopwords property: The list of stopwords. This property and the stopwords list property cannot both be set.
      Parameters:
      stopwords - the stopwords value to set.
      Returns:
      the StopwordsTokenFilter object itself.
    • setStopwords

      public StopwordsTokenFilter setStopwords(List<String> stopwords)
      Set the stopwords property: The list of stopwords. This property and the stopwords list property cannot both be set.
      Parameters:
      stopwords - the stopwords value to set.
      Returns:
      the StopwordsTokenFilter object itself.
    • getStopwordsList

      public StopwordsList getStopwordsList()
      Get the stopwordsList property: A predefined list of stopwords to use. This property and the stopwords property cannot both be set. Default is English. Possible values include: 'Arabic', 'Armenian', 'Basque', 'Brazilian', 'Bulgarian', 'Catalan', 'Czech', 'Danish', 'Dutch', 'English', 'Finnish', 'French', 'Galician', 'German', 'Greek', 'Hindi', 'Hungarian', 'Indonesian', 'Irish', 'Italian', 'Latvian', 'Norwegian', 'Persian', 'Portuguese', 'Romanian', 'Russian', 'Sorani', 'Spanish', 'Swedish', 'Thai', 'Turkish'.
      Returns:
      the stopwordsList value.
    • setStopwordsList

      public StopwordsTokenFilter setStopwordsList(StopwordsList stopwordsList)
      Set the stopwordsList property: A predefined list of stopwords to use. This property and the stopwords property cannot both be set. Default is English. Possible values include: 'Arabic', 'Armenian', 'Basque', 'Brazilian', 'Bulgarian', 'Catalan', 'Czech', 'Danish', 'Dutch', 'English', 'Finnish', 'French', 'Galician', 'German', 'Greek', 'Hindi', 'Hungarian', 'Indonesian', 'Irish', 'Italian', 'Latvian', 'Norwegian', 'Persian', 'Portuguese', 'Romanian', 'Russian', 'Sorani', 'Spanish', 'Swedish', 'Thai', 'Turkish'.
      Parameters:
      stopwordsList - the stopwordsList value to set.
      Returns:
      the StopwordsTokenFilter object itself.
    • isCaseIgnored

      public Boolean isCaseIgnored()
      Get the ignoreCase property: A value indicating whether to ignore case. If true, all words are converted to lower case first. Default is false.
      Returns:
      the ignoreCase value.
    • setCaseIgnored

      public StopwordsTokenFilter setCaseIgnored(Boolean caseIgnored)
      Set the ignoreCase property: A value indicating whether to ignore case. If true, all words are converted to lower case first. Default is false.
      Parameters:
      caseIgnored - the ignoreCase value to set.
      Returns:
      the StopwordsTokenFilter object itself.
    • areTrailingStopWordsRemoved

      public Boolean areTrailingStopWordsRemoved()
      Get the removeTrailingStopWords property: A value indicating whether to ignore the last search term if it's a stop word. Default is true.
      Returns:
      the removeTrailingStopWords value.
    • setTrailingStopWordsRemoved

      public StopwordsTokenFilter setTrailingStopWordsRemoved(Boolean trailingStopWordsRemoved)
      Set the removeTrailingStopWords property: A value indicating whether to ignore the last search term if it's a stop word. Default is true.
      Parameters:
      trailingStopWordsRemoved - the removeTrailingStopWords value to set.
      Returns:
      the StopwordsTokenFilter object itself.