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 Summary
Constructors Constructor Description KeepTokenFilter(String name, List<String> keepWords)
Constructor ofTokenFilter
.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Boolean
areLowerCaseKeepWords()
Get the lowerCaseKeepWords property: A value indicating whether to lower case all words first.List<String>
getKeepWords()
Get the keepWords property: The list of words to keep.KeepTokenFilter
setLowerCaseKeepWords(Boolean lowerCaseKeepWords)
Set the lowerCaseKeepWords property: A value indicating whether to lower case all words first.-
Methods inherited from class com.azure.search.documents.indexes.models.TokenFilter
getName
-
-
-
-
Constructor Detail
-
KeepTokenFilter
public KeepTokenFilter(String name, List<String> keepWords)
Constructor ofTokenFilter
.- 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 Detail
-
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.
-
-