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 Summary
Constructors Constructor Description StopwordsTokenFilter(String name)
Constructor ofStopwordsTokenFilter
.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Boolean
areTrailingStopWordsRemoved()
Get the removeTrailingStopWords property: A value indicating whether to ignore the last search term if it's a stop word.List<String>
getStopwords()
Get the stopwords property: The list of stopwords.StopwordsList
getStopwordsList()
Get the stopwordsList property: A predefined list of stopwords to use.Boolean
isCaseIgnored()
Get the ignoreCase property: A value indicating whether to ignore case.StopwordsTokenFilter
setCaseIgnored(Boolean caseIgnored)
Set the ignoreCase property: A value indicating whether to ignore case.StopwordsTokenFilter
setStopwords(String... stopwords)
Set the stopwords property: The list of stopwords.StopwordsTokenFilter
setStopwords(List<String> stopwords)
Set the stopwords property: The list of stopwords.StopwordsTokenFilter
setStopwordsList(StopwordsList stopwordsList)
Set the stopwordsList property: A predefined list of stopwords to use.StopwordsTokenFilter
setTrailingStopWordsRemoved(Boolean trailingStopWordsRemoved)
Set the removeTrailingStopWords property: A value indicating whether to ignore the last search term if it's a stop word.-
Methods inherited from class com.azure.search.documents.indexes.models.TokenFilter
getName
-
-
-
-
Constructor Detail
-
StopwordsTokenFilter
public StopwordsTokenFilter(String name)
Constructor ofStopwordsTokenFilter
.- 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 Detail
-
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.
-
-