Class KeepTokenFilter
java.lang.Object
com.azure.search.documents.indexes.models.TokenFilter
com.azure.search.documents.indexes.models.KeepTokenFilter
- All Implemented Interfaces:
com.azure.json.JsonSerializable<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
ConstructorsConstructorDescriptionKeepTokenFilter(String name, List<String> keepWords) Creates an instance of KeepTokenFilter class. -
Method Summary
Modifier and TypeMethodDescriptionGet the lowerCaseKeepWords property: A value indicating whether to lower case all words first.static KeepTokenFilterfromJson(com.azure.json.JsonReader jsonReader) Reads an instance of KeepTokenFilter from the JsonReader.Get the keepWords property: The list of words to keep.Get the odataType property: A URI fragment specifying the type of token filter.setLowerCaseKeepWords(Boolean lowerCaseKeepWords) Set the lowerCaseKeepWords property: A value indicating whether to lower case all words first.com.azure.json.JsonWritertoJson(com.azure.json.JsonWriter jsonWriter) Methods inherited from class TokenFilter
getNameMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.azure.json.JsonSerializable
toJson, toJson, toJsonBytes, toJsonString
-
Constructor Details
-
KeepTokenFilter
-
-
Method Details
-
getOdataType
Get the odataType property: A URI fragment specifying the type of token filter.- Overrides:
getOdataTypein classTokenFilter- Returns:
- the odataType value.
-
getKeepWords
-
areLowerCaseKeepWords
Get the lowerCaseKeepWords property: A value indicating whether to lower case all words first. Default is false.- Returns:
- the lowerCaseKeepWords value.
-
setLowerCaseKeepWords
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.
-
toJson
- Specified by:
toJsonin interfacecom.azure.json.JsonSerializable<TokenFilter>- Overrides:
toJsonin classTokenFilter- Throws:
IOException
-
fromJson
Reads an instance of KeepTokenFilter from the JsonReader.- Parameters:
jsonReader- The JsonReader being read.- Returns:
- An instance of KeepTokenFilter if the JsonReader was pointing to an instance of it, or null if it was pointing to JSON null.
- Throws:
IllegalStateException- If the deserialized JSON object was missing any required properties.IOException- If an error occurs while reading the KeepTokenFilter.
-