Class StopwordsTokenFilter
java.lang.Object
com.azure.search.documents.indexes.models.TokenFilter
com.azure.search.documents.indexes.models.StopwordsTokenFilter
- All Implemented Interfaces:
com.azure.json.JsonSerializable<TokenFilter>
Removes stop words from a token stream. This token filter is implemented using Apache Lucene.
-
Constructor Summary
ConstructorsConstructorDescriptionStopwordsTokenFilter(String name) Creates an instance of StopwordsTokenFilter class. -
Method Summary
Modifier and TypeMethodDescriptionGet the trailingStopWordsRemoved property: A value indicating whether to ignore the last search term if it's a stop word.static StopwordsTokenFilterfromJson(com.azure.json.JsonReader jsonReader) Reads an instance of StopwordsTokenFilter from the JsonReader.Get the odataType property: A URI fragment specifying the type of token filter.Get the stopwords property: The list of stopwords.Get the stopwordsList property: A predefined list of stopwords to use.Get the caseIgnored property: A value indicating whether to ignore case.setCaseIgnored(Boolean caseIgnored) Set the caseIgnored property: A value indicating whether to ignore case.setStopwords(String... stopwords) Set the stopwords property: The list of stopwords.setStopwords(List<String> stopwords) Set the stopwords property: The list of stopwords.setStopwordsList(StopwordsList stopwordsList) Set the stopwordsList property: A predefined list of stopwords to use.setTrailingStopWordsRemoved(Boolean trailingStopWordsRemoved) Set the trailingStopWordsRemoved property: A value indicating whether to ignore the last search term if it's a stop word.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
-
StopwordsTokenFilter
Creates an instance of StopwordsTokenFilter class.- Parameters:
name- the name value to set.
-
-
Method Details
-
getOdataType
Get the odataType property: A URI fragment specifying the type of token filter.- Overrides:
getOdataTypein classTokenFilter- Returns:
- the odataType value.
-
getStopwords
-
setStopwords
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
Get the stopwordsList property: A predefined list of stopwords to use. This property and the stopwords property cannot both be set. Default is English.- Returns:
- the stopwordsList value.
-
setStopwordsList
Set the stopwordsList property: A predefined list of stopwords to use. This property and the stopwords property cannot both be set. Default is English.- Parameters:
stopwordsList- the stopwordsList value to set.- Returns:
- the StopwordsTokenFilter object itself.
-
isCaseIgnored
Get the caseIgnored property: A value indicating whether to ignore case. If true, all words are converted to lower case first. Default is false.- Returns:
- the caseIgnored value.
-
setCaseIgnored
Set the caseIgnored property: A value indicating whether to ignore case. If true, all words are converted to lower case first. Default is false.- Parameters:
caseIgnored- the caseIgnored value to set.- Returns:
- the StopwordsTokenFilter object itself.
-
areTrailingStopWordsRemoved
Get the trailingStopWordsRemoved property: A value indicating whether to ignore the last search term if it's a stop word. Default is true.- Returns:
- the trailingStopWordsRemoved value.
-
setTrailingStopWordsRemoved
Set the trailingStopWordsRemoved property: A value indicating whether to ignore the last search term if it's a stop word. Default is true.- Parameters:
trailingStopWordsRemoved- the trailingStopWordsRemoved value to set.- Returns:
- the StopwordsTokenFilter object itself.
-
toJson
- Specified by:
toJsonin interfacecom.azure.json.JsonSerializable<TokenFilter>- Overrides:
toJsonin classTokenFilter- Throws:
IOException
-
fromJson
public static StopwordsTokenFilter fromJson(com.azure.json.JsonReader jsonReader) throws IOException Reads an instance of StopwordsTokenFilter from the JsonReader.- Parameters:
jsonReader- The JsonReader being read.- Returns:
- An instance of StopwordsTokenFilter 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 StopwordsTokenFilter.
-
setStopwords
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.
-