Class PatternAnalyzer
java.lang.Object
com.azure.search.documents.indexes.models.LexicalAnalyzer
com.azure.search.documents.indexes.models.PatternAnalyzer
- All Implemented Interfaces:
com.azure.json.JsonSerializable<LexicalAnalyzer>
Flexibly separates text into terms via a regular expression pattern. This analyzer is implemented using Apache
Lucene.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGet the lowerCaseTerms property: A value indicating whether terms should be lower-cased.static PatternAnalyzerfromJson(com.azure.json.JsonReader jsonReader) Reads an instance of PatternAnalyzer from the JsonReader.getFlags()Get the flags property: Regular expression flags.Get the odataType property: A URI fragment specifying the type of analyzer.Get the pattern property: A regular expression pattern to match token separators.Get the stopwords property: A list of stopwords.setFlags(RegexFlags... flags) Set the flags property: Regular expression flags.setFlags(List<RegexFlags> flags) Set the flags property: Regular expression flags.setLowerCaseTerms(Boolean lowerCaseTerms) Set the lowerCaseTerms property: A value indicating whether terms should be lower-cased.setPattern(String pattern) Set the pattern property: A regular expression pattern to match token separators.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
-
PatternAnalyzer
Creates an instance of PatternAnalyzer 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.
-
areLowerCaseTerms
Get the lowerCaseTerms property: A value indicating whether terms should be lower-cased. Default is true.- Returns:
- the lowerCaseTerms value.
-
setLowerCaseTerms
Set the lowerCaseTerms property: A value indicating whether terms should be lower-cased. Default is true.- Parameters:
lowerCaseTerms- the lowerCaseTerms value to set.- Returns:
- the PatternAnalyzer object itself.
-
getPattern
Get the pattern property: A regular expression pattern to match token separators. Default is an expression that matches one or more non-word characters.- Returns:
- the pattern value.
-
setPattern
Set the pattern property: A regular expression pattern to match token separators. Default is an expression that matches one or more non-word characters.- Parameters:
pattern- the pattern value to set.- Returns:
- the PatternAnalyzer object itself.
-
getFlags
Get the flags property: Regular expression flags.- Returns:
- the flags value.
-
setFlags
Set the flags property: Regular expression flags.- Parameters:
flags- the flags value to set.- Returns:
- the PatternAnalyzer object itself.
-
getStopwords
-
setStopwords
Set the stopwords property: A list of stopwords.- Parameters:
stopwords- the stopwords value to set.- Returns:
- the PatternAnalyzer object itself.
-
toJson
- Specified by:
toJsonin interfacecom.azure.json.JsonSerializable<LexicalAnalyzer>- Overrides:
toJsonin classLexicalAnalyzer- Throws:
IOException
-
fromJson
Reads an instance of PatternAnalyzer from the JsonReader.- Parameters:
jsonReader- The JsonReader being read.- Returns:
- An instance of PatternAnalyzer 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 PatternAnalyzer.
-
setStopwords
Set the stopwords property: A list of stopwords.- Parameters:
stopwords- the stopwords value to set.- Returns:
- the PatternAnalyzer object itself.
-
setFlags
Set the flags property: Regular expression flags.- Parameters:
flags- the flags value to set.- Returns:
- the PatternAnalyzer object itself.
-