Class LuceneStandardAnalyzer
java.lang.Object
com.azure.search.documents.indexes.models.LexicalAnalyzer
com.azure.search.documents.indexes.models.LuceneStandardAnalyzer
- All Implemented Interfaces:
com.azure.json.JsonSerializable<LexicalAnalyzer>
Standard Apache Lucene analyzer; Composed of the standard tokenizer, lowercase filter and stop filter.
-
Constructor Summary
ConstructorsConstructorDescriptionLuceneStandardAnalyzer(String name) Creates an instance of LuceneStandardAnalyzer class. -
Method Summary
Modifier and TypeMethodDescriptionstatic LuceneStandardAnalyzerfromJson(com.azure.json.JsonReader jsonReader) Reads an instance of LuceneStandardAnalyzer from the JsonReader.Get the maxTokenLength property: The maximum token length.Get the odataType property: A URI fragment specifying the type of analyzer.Get the stopwords property: A list of stopwords.setMaxTokenLength(Integer maxTokenLength) Set the maxTokenLength property: The maximum token length.setStopwords(String... stopwords) Set the stopwords property: A list of stopwords.setStopwords(List<String> stopwords) Set the stopwords property: A list of stopwords.com.azure.json.JsonWritertoJson(com.azure.json.JsonWriter jsonWriter) Methods inherited from class LexicalAnalyzer
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
-
LuceneStandardAnalyzer
Creates an instance of LuceneStandardAnalyzer class.- Parameters:
name- the name value to set.
-
-
Method Details
-
getOdataType
Get the odataType property: A URI fragment specifying the type of analyzer.- Overrides:
getOdataTypein classLexicalAnalyzer- Returns:
- the odataType value.
-
getMaxTokenLength
Get the maxTokenLength property: The maximum token length. Default is 255. Tokens longer than the maximum length are split. The maximum token length that can be used is 300 characters.- Returns:
- the maxTokenLength value.
-
setMaxTokenLength
Set the maxTokenLength property: The maximum token length. Default is 255. Tokens longer than the maximum length are split. The maximum token length that can be used is 300 characters.- Parameters:
maxTokenLength- the maxTokenLength value to set.- Returns:
- the LuceneStandardAnalyzer object itself.
-
getStopwords
-
setStopwords
Set the stopwords property: A list of stopwords.- Parameters:
stopwords- the stopwords value to set.- Returns:
- the LuceneStandardAnalyzer object itself.
-
toJson
- Specified by:
toJsonin interfacecom.azure.json.JsonSerializable<LexicalAnalyzer>- Overrides:
toJsonin classLexicalAnalyzer- Throws:
IOException
-
fromJson
public static LuceneStandardAnalyzer fromJson(com.azure.json.JsonReader jsonReader) throws IOException Reads an instance of LuceneStandardAnalyzer from the JsonReader.- Parameters:
jsonReader- The JsonReader being read.- Returns:
- An instance of LuceneStandardAnalyzer 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 LuceneStandardAnalyzer.
-
setStopwords
Set the stopwords property: A list of stopwords.- Parameters:
stopwords- the stopwords value to set.- Returns:
- the LuceneStandardAnalyzer object itself.
-