Class PatternAnalyzer
- java.lang.Object
-
- com.azure.search.documents.indexes.models.LexicalAnalyzer
-
- com.azure.search.documents.indexes.models.PatternAnalyzer
-
public final class PatternAnalyzer extends LexicalAnalyzer
Flexibly separates text into terms via a regular expression pattern. This analyzer is implemented using Apache Lucene.
-
-
Constructor Summary
Constructors Constructor Description PatternAnalyzer(String name)
Creates an instance of PatternAnalyzer class.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Boolean
areLowerCaseTerms()
Get the lowerCaseTerms property: A value indicating whether terms should be lower-cased.List<RegexFlags>
getFlags()
Get the flags property: Regular expression flags.String
getPattern()
Get the pattern property: A regular expression pattern to match token separators.List<String>
getStopwords()
Get the stopwords property: A list of stopwords.PatternAnalyzer
setFlags(RegexFlags... flags)
Set the flags property: Regular expression flags.PatternAnalyzer
setFlags(List<RegexFlags> flags)
Set the flags property: Regular expression flags.PatternAnalyzer
setLowerCaseTerms(Boolean lowerCaseTerms)
Set the lowerCaseTerms property: A value indicating whether terms should be lower-cased.PatternAnalyzer
setPattern(String pattern)
Set the pattern property: A regular expression pattern to match token separators.PatternAnalyzer
setStopwords(String... stopwords)
Set the stopwords property: A list of stopwords.PatternAnalyzer
setStopwords(List<String> stopwords)
Set the stopwords property: A list of stopwords.-
Methods inherited from class com.azure.search.documents.indexes.models.LexicalAnalyzer
getName
-
-
-
-
Constructor Detail
-
PatternAnalyzer
public PatternAnalyzer(String name)
Creates an instance of PatternAnalyzer class.- Parameters:
name
- the name value to set.
-
-
Method Detail
-
areLowerCaseTerms
public Boolean areLowerCaseTerms()
Get the lowerCaseTerms property: A value indicating whether terms should be lower-cased. Default is true.- Returns:
- the lowerCaseTerms value.
-
setLowerCaseTerms
public PatternAnalyzer setLowerCaseTerms(Boolean lowerCaseTerms)
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
public String 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
public PatternAnalyzer setPattern(String pattern)
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
public List<RegexFlags> getFlags()
Get the flags property: Regular expression flags.- Returns:
- the flags value.
-
setFlags
public PatternAnalyzer setFlags(List<RegexFlags> flags)
Set the flags property: Regular expression flags.- Parameters:
flags
- the flags value to set.- Returns:
- the PatternAnalyzer object itself.
-
getStopwords
public List<String> getStopwords()
Get the stopwords property: A list of stopwords.- Returns:
- the stopwords value.
-
setStopwords
public PatternAnalyzer setStopwords(List<String> stopwords)
Set the stopwords property: A list of stopwords.- Parameters:
stopwords
- the stopwords value to set.- Returns:
- the PatternAnalyzer object itself.
-
setStopwords
public PatternAnalyzer setStopwords(String... stopwords)
Set the stopwords property: A list of stopwords.- Parameters:
stopwords
- the stopwords value to set.- Returns:
- the PatternAnalyzer object itself.
-
setFlags
public PatternAnalyzer setFlags(RegexFlags... flags)
Set the flags property: Regular expression flags.- Parameters:
flags
- the flags value to set.- Returns:
- the PatternAnalyzer object itself.
-
-