Class EdgeNGramTokenFilter
java.lang.Object
com.azure.search.documents.indexes.models.TokenFilter
com.azure.search.documents.indexes.models.EdgeNGramTokenFilter
- All Implemented Interfaces:
com.azure.json.JsonSerializable<TokenFilter>
Generates n-grams of the given size(s) starting from the front or the back
of an input token. This token filter is implemented using Apache Lucene.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGet the maxGram property: The maximum n-gram length.Get the minGram property: The minimum n-gram length.getSide()Get the side property: Specifies which side of the input the n-gram should be generated from.setMaxGram(Integer maxGram) Set the maxGram property: The maximum n-gram length.setMinGram(Integer minGram) Set the minGram property: The minimum n-gram length.Set the side property: Specifies which side of the input the n-gram should be generated from.com.azure.json.JsonWritertoJson(com.azure.json.JsonWriter jsonWriter) Methods inherited from class TokenFilter
fromJson, getName, getOdataTypeMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.azure.json.JsonSerializable
toJson, toJson, toJsonBytes, toJsonString
-
Constructor Details
-
EdgeNGramTokenFilter
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.
-
-
Method Details
-
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
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 EdgeNGramTokenFilter object itself.
-
getMaxGram
Get the maxGram property: The maximum n-gram length. Default is 2.- Returns:
- the maxGram value.
-
setMaxGram
Set the maxGram property: The maximum n-gram length. Default is 2.- Parameters:
maxGram- the maxGram value to set.- Returns:
- the EdgeNGramTokenFilter object itself.
-
getSide
Get the side property: Specifies which side of the input the n-gram should be generated from. Default is "front". Possible values include: 'Front', 'Back'.- Returns:
- the side value.
-
setSide
Set the side property: Specifies which side of the input the n-gram should be generated from. Default is "front". Possible values include: 'Front', 'Back'.- Parameters:
side- the side value to set.- Returns:
- the EdgeNGramTokenFilter object itself.
-
toJson
Description copied from class:TokenFilter- Specified by:
toJsonin interfacecom.azure.json.JsonSerializable<TokenFilter>- Overrides:
toJsonin classTokenFilter- Throws:
IOException
-