Class WordDelimiterTokenFilter
java.lang.Object
com.azure.search.documents.indexes.models.TokenFilter
com.azure.search.documents.indexes.models.WordDelimiterTokenFilter
- All Implemented Interfaces:
com.azure.json.JsonSerializable<TokenFilter>
Splits words into subwords and performs optional transformations on subword groups. This token filter is implemented
using Apache Lucene.
-
Constructor Summary
ConstructorsConstructorDescriptionCreates an instance of WordDelimiterTokenFilter class. -
Method Summary
Modifier and TypeMethodDescriptionGet the numbersCatenated property: A value indicating whether maximum runs of number parts will be catenated.Get the wordsCatenated property: A value indicating whether maximum runs of word parts will be catenated.Get the catenateAll property: A value indicating whether all subword parts will be catenated.static WordDelimiterTokenFilterfromJson(com.azure.json.JsonReader jsonReader) Reads an instance of WordDelimiterTokenFilter from the JsonReader.Get the generateNumberParts property: A value indicating whether to generate number subwords.Get the generateWordParts property: A value indicating whether to generate part words.Get the odataType property: A URI fragment specifying the type of token filter.Get the protectedWords property: A list of tokens to protect from being delimited.Get the preserveOriginal property: A value indicating whether original words will be preserved and added to the subword list.Get the stemEnglishPossessive property: A value indicating whether to remove trailing "'s" for each subword.setCatenateAll(Boolean catenateAll) Set the catenateAll property: A value indicating whether all subword parts will be catenated.setGenerateNumberParts(Boolean generateNumberParts) Set the generateNumberParts property: A value indicating whether to generate number subwords.setGenerateWordParts(Boolean generateWordParts) Set the generateWordParts property: A value indicating whether to generate part words.setNumbersCatenated(Boolean numbersCatenated) Set the numbersCatenated property: A value indicating whether maximum runs of number parts will be catenated.setPreserveOriginal(Boolean preserveOriginal) Set the preserveOriginal property: A value indicating whether original words will be preserved and added to the subword list.setProtectedWords(String... protectedWords) Set the protectedWords property: A list of tokens to protect from being delimited.setProtectedWords(List<String> protectedWords) Set the protectedWords property: A list of tokens to protect from being delimited.setSplitOnCaseChange(Boolean splitOnCaseChange) Set the splitOnCaseChange property: A value indicating whether to split words on caseChange.setSplitOnNumerics(Boolean splitOnNumerics) Set the splitOnNumerics property: A value indicating whether to split on numbers.setStemEnglishPossessive(Boolean stemEnglishPossessive) Set the stemEnglishPossessive property: A value indicating whether to remove trailing "'s" for each subword.setWordsCatenated(Boolean wordsCatenated) Set the wordsCatenated property: A value indicating whether maximum runs of word parts will be catenated.Get the splitOnCaseChange property: A value indicating whether to split words on caseChange.Get the splitOnNumerics property: A value indicating whether to split on numbers.com.azure.json.JsonWritertoJson(com.azure.json.JsonWriter jsonWriter) Methods inherited from class TokenFilter
getNameMethods 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
-
WordDelimiterTokenFilter
Creates an instance of WordDelimiterTokenFilter class.- Parameters:
name- the name value to set.
-
-
Method Details
-
getOdataType
Get the odataType property: A URI fragment specifying the type of token filter.- Overrides:
getOdataTypein classTokenFilter- Returns:
- the odataType value.
-
generateWordParts
Get the generateWordParts property: A value indicating whether to generate part words. If set, causes parts of words to be generated; for example "AzureSearch" becomes "Azure" "Search". Default is true.- Returns:
- the generateWordParts value.
-
setGenerateWordParts
Set the generateWordParts property: A value indicating whether to generate part words. If set, causes parts of words to be generated; for example "AzureSearch" becomes "Azure" "Search". Default is true.- Parameters:
generateWordParts- the generateWordParts value to set.- Returns:
- the WordDelimiterTokenFilter object itself.
-
generateNumberParts
Get the generateNumberParts property: A value indicating whether to generate number subwords. Default is true.- Returns:
- the generateNumberParts value.
-
setGenerateNumberParts
Set the generateNumberParts property: A value indicating whether to generate number subwords. Default is true.- Parameters:
generateNumberParts- the generateNumberParts value to set.- Returns:
- the WordDelimiterTokenFilter object itself.
-
areWordsCatenated
Get the wordsCatenated property: A value indicating whether maximum runs of word parts will be catenated. For example, if this is set to true, "Azure-Search" becomes "AzureSearch". Default is false.- Returns:
- the wordsCatenated value.
-
setWordsCatenated
Set the wordsCatenated property: A value indicating whether maximum runs of word parts will be catenated. For example, if this is set to true, "Azure-Search" becomes "AzureSearch". Default is false.- Parameters:
wordsCatenated- the wordsCatenated value to set.- Returns:
- the WordDelimiterTokenFilter object itself.
-
areNumbersCatenated
Get the numbersCatenated property: A value indicating whether maximum runs of number parts will be catenated. For example, if this is set to true, "1-2" becomes "12". Default is false.- Returns:
- the numbersCatenated value.
-
setNumbersCatenated
Set the numbersCatenated property: A value indicating whether maximum runs of number parts will be catenated. For example, if this is set to true, "1-2" becomes "12". Default is false.- Parameters:
numbersCatenated- the numbersCatenated value to set.- Returns:
- the WordDelimiterTokenFilter object itself.
-
catenateAll
Get the catenateAll property: A value indicating whether all subword parts will be catenated. For example, if this is set to true, "Azure-Search-1" becomes "AzureSearch1". Default is false.- Returns:
- the catenateAll value.
-
setCatenateAll
Set the catenateAll property: A value indicating whether all subword parts will be catenated. For example, if this is set to true, "Azure-Search-1" becomes "AzureSearch1". Default is false.- Parameters:
catenateAll- the catenateAll value to set.- Returns:
- the WordDelimiterTokenFilter object itself.
-
splitOnCaseChange
Get the splitOnCaseChange property: A value indicating whether to split words on caseChange. For example, if this is set to true, "AzureSearch" becomes "Azure" "Search". Default is true.- Returns:
- the splitOnCaseChange value.
-
setSplitOnCaseChange
Set the splitOnCaseChange property: A value indicating whether to split words on caseChange. For example, if this is set to true, "AzureSearch" becomes "Azure" "Search". Default is true.- Parameters:
splitOnCaseChange- the splitOnCaseChange value to set.- Returns:
- the WordDelimiterTokenFilter object itself.
-
isPreserveOriginal
Get the preserveOriginal property: A value indicating whether original words will be preserved and added to the subword list. Default is false.- Returns:
- the preserveOriginal value.
-
setPreserveOriginal
Set the preserveOriginal property: A value indicating whether original words will be preserved and added to the subword list. Default is false.- Parameters:
preserveOriginal- the preserveOriginal value to set.- Returns:
- the WordDelimiterTokenFilter object itself.
-
splitOnNumerics
Get the splitOnNumerics property: A value indicating whether to split on numbers. For example, if this is set to true, "Azure1Search" becomes "Azure" "1" "Search". Default is true.- Returns:
- the splitOnNumerics value.
-
setSplitOnNumerics
Set the splitOnNumerics property: A value indicating whether to split on numbers. For example, if this is set to true, "Azure1Search" becomes "Azure" "1" "Search". Default is true.- Parameters:
splitOnNumerics- the splitOnNumerics value to set.- Returns:
- the WordDelimiterTokenFilter object itself.
-
isStemEnglishPossessive
Get the stemEnglishPossessive property: A value indicating whether to remove trailing "'s" for each subword. Default is true.- Returns:
- the stemEnglishPossessive value.
-
setStemEnglishPossessive
Set the stemEnglishPossessive property: A value indicating whether to remove trailing "'s" for each subword. Default is true.- Parameters:
stemEnglishPossessive- the stemEnglishPossessive value to set.- Returns:
- the WordDelimiterTokenFilter object itself.
-
getProtectedWords
-
setProtectedWords
Set the protectedWords property: A list of tokens to protect from being delimited.- Parameters:
protectedWords- the protectedWords value to set.- Returns:
- the WordDelimiterTokenFilter object itself.
-
toJson
- Specified by:
toJsonin interfacecom.azure.json.JsonSerializable<TokenFilter>- Overrides:
toJsonin classTokenFilter- Throws:
IOException
-
fromJson
public static WordDelimiterTokenFilter fromJson(com.azure.json.JsonReader jsonReader) throws IOException Reads an instance of WordDelimiterTokenFilter from the JsonReader.- Parameters:
jsonReader- The JsonReader being read.- Returns:
- An instance of WordDelimiterTokenFilter 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 WordDelimiterTokenFilter.
-
setProtectedWords
Set the protectedWords property: A list of tokens to protect from being delimited.- Parameters:
protectedWords- the protectedWords value to set.- Returns:
- the WordDelimiterTokenFilter object itself.
-