Class PatternCaptureTokenFilter
java.lang.Object
com.azure.search.documents.indexes.models.TokenFilter
com.azure.search.documents.indexes.models.PatternCaptureTokenFilter
Uses Java regexes to emit multiple tokens - one for each capture group in
one or more patterns. This token filter is implemented using Apache Lucene.
-
Constructor Summary
ConstructorsConstructorDescriptionPatternCaptureTokenFilter
(String name, List<String> patterns) Constructor ofPatternCaptureTokenFilter
. -
Method Summary
Modifier and TypeMethodDescriptionGet the patterns property: A list of patterns to match against each token.Get the preserveOriginal property: A value indicating whether to return the original token even if one of the patterns matches.setPreserveOriginal
(Boolean preserveOriginal) Set the preserveOriginal property: A value indicating whether to return the original token even if one of the patterns matches.Methods inherited from class com.azure.search.documents.indexes.models.TokenFilter
getName
-
Constructor Details
-
PatternCaptureTokenFilter
Constructor ofPatternCaptureTokenFilter
.- Parameters:
name
- The name of the token filter. It must only contain letters, digits, spaces, dashes or underscores, can only start and end with alphanumeric characters, and is limited to 128 characters.patterns
- A list of patterns to match against each token.
-
-
Method Details
-
getPatterns
Get the patterns property: A list of patterns to match against each token.- Returns:
- the patterns value.
-
isPreserveOriginal
Get the preserveOriginal property: A value indicating whether to return the original token even if one of the patterns matches. Default is true.- Returns:
- the preserveOriginal value.
-
setPreserveOriginal
Set the preserveOriginal property: A value indicating whether to return the original token even if one of the patterns matches. Default is true.- Parameters:
preserveOriginal
- the preserveOriginal value to set.- Returns:
- the PatternCaptureTokenFilter object itself.
-