Class PathHierarchyTokenizer
java.lang.Object
com.azure.search.documents.indexes.models.LexicalTokenizer
com.azure.search.documents.indexes.models.PathHierarchyTokenizer
- All Implemented Interfaces:
com.azure.json.JsonSerializable<LexicalTokenizer>
Tokenizer for path-like hierarchies. This tokenizer is implemented using Apache Lucene.
-
Constructor Summary
ConstructorsConstructorDescriptionPathHierarchyTokenizer(String name) Creates an instance of PathHierarchyTokenizer class. -
Method Summary
Modifier and TypeMethodDescriptionstatic PathHierarchyTokenizerfromJson(com.azure.json.JsonReader jsonReader) Reads an instance of PathHierarchyTokenizer from the JsonReader.Get the delimiter property: The delimiter character to use.Get the maxTokenLength property: The maximum token length.Get the numberOfTokensToSkip property: The number of initial tokens to skip.Get the odataType property: A URI fragment specifying the type of tokenizer.Get the replacement property: A value that, if set, replaces the delimiter character.Get the tokenOrderReversed property: A value indicating whether to generate tokens in reverse order.setDelimiter(Character delimiter) Set the delimiter property: The delimiter character to use.setMaxTokenLength(Integer maxTokenLength) Set the maxTokenLength property: The maximum token length.setNumberOfTokensToSkip(Integer numberOfTokensToSkip) Set the numberOfTokensToSkip property: The number of initial tokens to skip.setReplacement(Character replacement) Set the replacement property: A value that, if set, replaces the delimiter character.setTokenOrderReversed(Boolean tokenOrderReversed) Set the tokenOrderReversed property: A value indicating whether to generate tokens in reverse order.com.azure.json.JsonWritertoJson(com.azure.json.JsonWriter jsonWriter) Methods inherited from class com.azure.search.documents.indexes.models.LexicalTokenizer
getNameMethods inherited from class java.lang.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
-
PathHierarchyTokenizer
Creates an instance of PathHierarchyTokenizer class.- Parameters:
name- the name value to set.
-
-
Method Details
-
getOdataType
Get the odataType property: A URI fragment specifying the type of tokenizer.- Overrides:
getOdataTypein classLexicalTokenizer- Returns:
- the odataType value.
-
getDelimiter
Get the delimiter property: The delimiter character to use. Default is "/".- Returns:
- the delimiter value.
-
setDelimiter
Set the delimiter property: The delimiter character to use. Default is "/".- Parameters:
delimiter- the delimiter value to set.- Returns:
- the PathHierarchyTokenizer object itself.
-
getReplacement
Get the replacement property: A value that, if set, replaces the delimiter character. Default is "/".- Returns:
- the replacement value.
-
setReplacement
Set the replacement property: A value that, if set, replaces the delimiter character. Default is "/".- Parameters:
replacement- the replacement value to set.- Returns:
- the PathHierarchyTokenizer object itself.
-
getMaxTokenLength
Get the maxTokenLength property: The maximum token length. Default and maximum is 300.- Returns:
- the maxTokenLength value.
-
setMaxTokenLength
Set the maxTokenLength property: The maximum token length. Default and maximum is 300.- Parameters:
maxTokenLength- the maxTokenLength value to set.- Returns:
- the PathHierarchyTokenizer object itself.
-
isTokenOrderReversed
Get the tokenOrderReversed property: A value indicating whether to generate tokens in reverse order. Default is false.- Returns:
- the tokenOrderReversed value.
-
setTokenOrderReversed
Set the tokenOrderReversed property: A value indicating whether to generate tokens in reverse order. Default is false.- Parameters:
tokenOrderReversed- the tokenOrderReversed value to set.- Returns:
- the PathHierarchyTokenizer object itself.
-
getNumberOfTokensToSkip
Get the numberOfTokensToSkip property: The number of initial tokens to skip. Default is 0.- Returns:
- the numberOfTokensToSkip value.
-
setNumberOfTokensToSkip
Set the numberOfTokensToSkip property: The number of initial tokens to skip. Default is 0.- Parameters:
numberOfTokensToSkip- the numberOfTokensToSkip value to set.- Returns:
- the PathHierarchyTokenizer object itself.
-
toJson
- Specified by:
toJsonin interfacecom.azure.json.JsonSerializable<LexicalTokenizer>- Overrides:
toJsonin classLexicalTokenizer- Throws:
IOException
-
fromJson
public static PathHierarchyTokenizer fromJson(com.azure.json.JsonReader jsonReader) throws IOException Reads an instance of PathHierarchyTokenizer from the JsonReader.- Parameters:
jsonReader- The JsonReader being read.- Returns:
- An instance of PathHierarchyTokenizer if the JsonReader was pointing to an instance of it, or null if it was pointing to JSON null.
- Throws:
IllegalStateException- If the deserialized JSON object was missing any required properties.IOException- If an error occurs while reading the PathHierarchyTokenizer.
-