Class PatternTokenizer
java.lang.Object
com.azure.search.documents.indexes.models.LexicalTokenizer
com.azure.search.documents.indexes.models.PatternTokenizer
Tokenizer that uses regex pattern matching to construct distinct tokens.
This tokenizer is implemented using Apache Lucene.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetFlags()
Get the flags property: Regular expression flags.getGroup()
Get the group property: The zero-based ordinal of the matching group in the regular expression pattern to extract into tokens.Get the pattern property: A regular expression pattern to match token separators.setFlags
(RegexFlags... flags) Set the flags property: Regular expression flags.setFlags
(List<RegexFlags> flags) Set the flags property: Regular expression flags.Set the group property: The zero-based ordinal of the matching group in the regular expression pattern to extract into tokens.setPattern
(String pattern) Set the pattern property: A regular expression pattern to match token separators.Methods inherited from class com.azure.search.documents.indexes.models.LexicalTokenizer
getName
-
Constructor Details
-
PatternTokenizer
Constructor ofPatternTokenizer
.- Parameters:
name
- The name of the tokenizer. It must only contain letters, digits, spaces, dashes or underscores, can only start and end with alphanumeric characters, and is limited to 128 characters.
-
-
Method Details
-
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 PatternTokenizer 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 PatternTokenizer object itself.
-
setFlags
Set the flags property: Regular expression flags.- Parameters:
flags
- the flags value to set.- Returns:
- the PatternTokenizer object itself.
-
getGroup
Get the group property: The zero-based ordinal of the matching group in the regular expression pattern to extract into tokens. Use -1 if you want to use the entire pattern to split the input into tokens, irrespective of matching groups. Default is -1.- Returns:
- the group value.
-
setGroup
Set the group property: The zero-based ordinal of the matching group in the regular expression pattern to extract into tokens. Use -1 if you want to use the entire pattern to split the input into tokens, irrespective of matching groups. Default is -1.- Parameters:
group
- the group value to set.- Returns:
- the PatternTokenizer object itself.
-