Class CommonGramTokenFilter
java.lang.Object
com.azure.search.documents.indexes.models.TokenFilter
com.azure.search.documents.indexes.models.CommonGramTokenFilter
Construct bigrams for frequently occurring terms while indexing. Single
terms are still indexed too, with bigrams overlaid. This token filter is
implemented using Apache Lucene.
-
Constructor Summary
ConstructorsConstructorDescriptionCommonGramTokenFilter
(String name, List<String> commonWords) Constructor ofTokenFilter
. -
Method Summary
Modifier and TypeMethodDescriptionGet the commonWords property: The set of common words.Get the ignoreCase property: A value indicating whether common words matching will be case insensitive.Get the useQueryMode property: A value that indicates whether the token filter is in query mode.setCaseIgnored
(Boolean caseIgnored) Set the ignoreCase property: A value indicating whether common words matching will be case insensitive.setQueryModeUsed
(Boolean queryModeUsed) Set the useQueryMode property: A value that indicates whether the token filter is in query mode.Methods inherited from class com.azure.search.documents.indexes.models.TokenFilter
getName
-
Constructor Details
-
CommonGramTokenFilter
Constructor ofTokenFilter
.- 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.commonWords
- The set of common words.
-
-
Method Details
-
getCommonWords
Get the commonWords property: The set of common words.- Returns:
- the commonWords value.
-
isCaseIgnored
Get the ignoreCase property: A value indicating whether common words matching will be case insensitive. Default is false.- Returns:
- the ignoreCase value.
-
setCaseIgnored
Set the ignoreCase property: A value indicating whether common words matching will be case insensitive. Default is false.- Parameters:
caseIgnored
- the ignoreCase value to set.- Returns:
- the CommonGramTokenFilter object itself.
-
isQueryModeUsed
Get the useQueryMode property: A value that indicates whether the token filter is in query mode. When in query mode, the token filter generates bigrams and then removes common words and single terms followed by a common word. Default is false.- Returns:
- the useQueryMode value.
-
setQueryModeUsed
Set the useQueryMode property: A value that indicates whether the token filter is in query mode. When in query mode, the token filter generates bigrams and then removes common words and single terms followed by a common word. Default is false.- Parameters:
queryModeUsed
- the useQueryMode value to set.- Returns:
- the CommonGramTokenFilter object itself.
-