Class NGramTokenFilter
- java.lang.Object
-
- com.azure.search.documents.indexes.models.TokenFilter
-
- com.azure.search.documents.indexes.models.NGramTokenFilter
-
public final class NGramTokenFilter extends TokenFilter
Generates n-grams of the given size(s). This token filter is implemented using Apache Lucene.
-
-
Constructor Summary
Constructors Constructor Description NGramTokenFilter(String name)
Constructor ofNGramTokenFilter
.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Integer
getMaxGram()
Get the maxGram property: The maximum n-gram length.Integer
getMinGram()
Get the minGram property: The minimum n-gram length.NGramTokenFilter
setMaxGram(Integer maxGram)
Set the maxGram property: The maximum n-gram length.NGramTokenFilter
setMinGram(Integer minGram)
Set the minGram property: The minimum n-gram length.-
Methods inherited from class com.azure.search.documents.indexes.models.TokenFilter
getName
-
-
-
-
Constructor Detail
-
NGramTokenFilter
public NGramTokenFilter(String name)
Constructor ofNGramTokenFilter
.- 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.
-
-
Method Detail
-
getMinGram
public Integer getMinGram()
Get the minGram property: The minimum n-gram length. Default is 1. Must be less than the value of maxGram.- Returns:
- the minGram value.
-
setMinGram
public NGramTokenFilter setMinGram(Integer minGram)
Set the minGram property: The minimum n-gram length. Default is 1. Must be less than the value of maxGram.- Parameters:
minGram
- the minGram value to set.- Returns:
- the NGramTokenFilter object itself.
-
getMaxGram
public Integer getMaxGram()
Get the maxGram property: The maximum n-gram length. Default is 2.- Returns:
- the maxGram value.
-
setMaxGram
public NGramTokenFilter setMaxGram(Integer maxGram)
Set the maxGram property: The maximum n-gram length. Default is 2.- Parameters:
maxGram
- the maxGram value to set.- Returns:
- the NGramTokenFilter object itself.
-
-