Class TokenFilterDefinition
java.lang.Object
co.elastic.clients.elasticsearch._types.analysis.TokenFilterDefinition
- All Implemented Interfaces:
JsonpSerializable
,OpenTaggedUnion<TokenFilterDefinition.Kind,java.lang.Object>
,TaggedUnion<TokenFilterDefinition.Kind,java.lang.Object>
@JsonpDeserializable public class TokenFilterDefinition extends java.lang.Object implements OpenTaggedUnion<TokenFilterDefinition.Kind,java.lang.Object>, JsonpSerializable
- See Also:
- API specification
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
TokenFilterDefinition.Builder
static class
TokenFilterDefinition.Kind
TokenFilterDefinition
variant kinds. -
Field Summary
Fields Modifier and Type Field Description static JsonpDeserializer<TokenFilterDefinition>
_DESERIALIZER
-
Constructor Summary
Constructors Constructor Description TokenFilterDefinition(TokenFilterDefinitionVariant value)
TokenFilterDefinition(java.lang.String kind, JsonData value)
Build a custom plugin-definedTokenFilterDefinition
, given its kind and some JSON data -
Method Summary
Modifier and Type Method Description JsonData
_custom()
Get the custom plugin-defined variant value.java.lang.String
_customKind()
Get the actual kind when_kind()
equalsTokenFilterDefinition.Kind._Custom
(plugin-defined variant).java.lang.Object
_get()
boolean
_isCustom()
Is this a customTokenFilterDefinition
defined by a plugin?TokenFilterDefinition.Kind
_kind()
Get the of the kind of variant held by this object.AsciiFoldingTokenFilter
asciifolding()
Get theasciifolding
variant value.CommonGramsTokenFilter
commonGrams()
Get thecommon_grams
variant value.ConditionTokenFilter
condition()
Get thecondition
variant value.DelimitedPayloadTokenFilter
delimitedPayload()
Get thedelimited_payload
variant value.DictionaryDecompounderTokenFilter
dictionaryDecompounder()
Get thedictionary_decompounder
variant value.EdgeNGramTokenFilter
edgeNgram()
Get theedge_ngram
variant value.ElisionTokenFilter
elision()
Get theelision
variant value.FingerprintTokenFilter
fingerprint()
Get thefingerprint
variant value.HunspellTokenFilter
hunspell()
Get thehunspell
variant value.HyphenationDecompounderTokenFilter
hyphenationDecompounder()
Get thehyphenation_decompounder
variant value.IcuCollationTokenFilter
icuCollation()
Get theicu_collation
variant value.IcuFoldingTokenFilter
icuFolding()
Get theicu_folding
variant value.IcuNormalizationTokenFilter
icuNormalizer()
Get theicu_normalizer
variant value.IcuTokenizer
icuTokenizer()
Get theicu_tokenizer
variant value.IcuTransformTokenFilter
icuTransform()
Get theicu_transform
variant value.boolean
isAsciifolding()
Is this variant instance of kindasciifolding
?boolean
isCommonGrams()
Is this variant instance of kindcommon_grams
?boolean
isCondition()
Is this variant instance of kindcondition
?boolean
isDelimitedPayload()
Is this variant instance of kinddelimited_payload
?boolean
isDictionaryDecompounder()
Is this variant instance of kinddictionary_decompounder
?boolean
isEdgeNgram()
Is this variant instance of kindedge_ngram
?boolean
isElision()
Is this variant instance of kindelision
?boolean
isFingerprint()
Is this variant instance of kindfingerprint
?boolean
isHunspell()
Is this variant instance of kindhunspell
?boolean
isHyphenationDecompounder()
Is this variant instance of kindhyphenation_decompounder
?boolean
isIcuCollation()
Is this variant instance of kindicu_collation
?boolean
isIcuFolding()
Is this variant instance of kindicu_folding
?boolean
isIcuNormalizer()
Is this variant instance of kindicu_normalizer
?boolean
isIcuTokenizer()
Is this variant instance of kindicu_tokenizer
?boolean
isIcuTransform()
Is this variant instance of kindicu_transform
?boolean
isKeep()
Is this variant instance of kindkeep
?boolean
isKeepTypes()
Is this variant instance of kindkeep_types
?boolean
isKeywordMarker()
Is this variant instance of kindkeyword_marker
?boolean
isKstem()
Is this variant instance of kindkstem
?boolean
isKuromojiPartOfSpeech()
Is this variant instance of kindkuromoji_part_of_speech
?boolean
isKuromojiReadingform()
Is this variant instance of kindkuromoji_readingform
?boolean
isKuromojiStemmer()
Is this variant instance of kindkuromoji_stemmer
?boolean
isLength()
Is this variant instance of kindlength
?boolean
isLimit()
Is this variant instance of kindlimit
?boolean
isLowercase()
Is this variant instance of kindlowercase
?boolean
isMultiplexer()
Is this variant instance of kindmultiplexer
?boolean
isNgram()
Is this variant instance of kindngram
?boolean
isNoriPartOfSpeech()
Is this variant instance of kindnori_part_of_speech
?boolean
isPatternCapture()
Is this variant instance of kindpattern_capture
?boolean
isPatternReplace()
Is this variant instance of kindpattern_replace
?boolean
isPhonetic()
Is this variant instance of kindphonetic
?boolean
isPorterStem()
Is this variant instance of kindporter_stem
?boolean
isPredicateTokenFilter()
Is this variant instance of kindpredicate_token_filter
?boolean
isRemoveDuplicates()
Is this variant instance of kindremove_duplicates
?boolean
isReverse()
Is this variant instance of kindreverse
?boolean
isShingle()
Is this variant instance of kindshingle
?boolean
isSnowball()
Is this variant instance of kindsnowball
?boolean
isStemmer()
Is this variant instance of kindstemmer
?boolean
isStemmerOverride()
Is this variant instance of kindstemmer_override
?boolean
isStop()
Is this variant instance of kindstop
?boolean
isSynonym()
Is this variant instance of kindsynonym
?boolean
isSynonymGraph()
Is this variant instance of kindsynonym_graph
?boolean
isTrim()
Is this variant instance of kindtrim
?boolean
isTruncate()
Is this variant instance of kindtruncate
?boolean
isUnique()
Is this variant instance of kindunique
?boolean
isUppercase()
Is this variant instance of kinduppercase
?boolean
isWordDelimiter()
Is this variant instance of kindword_delimiter
?boolean
isWordDelimiterGraph()
Is this variant instance of kindword_delimiter_graph
?KeepWordsTokenFilter
keep()
Get thekeep
variant value.KeepTypesTokenFilter
keepTypes()
Get thekeep_types
variant value.KeywordMarkerTokenFilter
keywordMarker()
Get thekeyword_marker
variant value.KStemTokenFilter
kstem()
Get thekstem
variant value.KuromojiPartOfSpeechTokenFilter
kuromojiPartOfSpeech()
Get thekuromoji_part_of_speech
variant value.KuromojiReadingFormTokenFilter
kuromojiReadingform()
Get thekuromoji_readingform
variant value.KuromojiStemmerTokenFilter
kuromojiStemmer()
Get thekuromoji_stemmer
variant value.LengthTokenFilter
length()
Get thelength
variant value.LimitTokenCountTokenFilter
limit()
Get thelimit
variant value.LowercaseTokenFilter
lowercase()
Get thelowercase
variant value.MultiplexerTokenFilter
multiplexer()
Get themultiplexer
variant value.NGramTokenFilter
ngram()
Get thengram
variant value.NoriPartOfSpeechTokenFilter
noriPartOfSpeech()
Get thenori_part_of_speech
variant value.static TokenFilterDefinition
of(java.util.function.Function<TokenFilterDefinition.Builder,ObjectBuilder<TokenFilterDefinition>> fn)
PatternCaptureTokenFilter
patternCapture()
Get thepattern_capture
variant value.PatternReplaceTokenFilter
patternReplace()
Get thepattern_replace
variant value.PhoneticTokenFilter
phonetic()
Get thephonetic
variant value.PorterStemTokenFilter
porterStem()
Get theporter_stem
variant value.PredicateTokenFilter
predicateTokenFilter()
Get thepredicate_token_filter
variant value.RemoveDuplicatesTokenFilter
removeDuplicates()
Get theremove_duplicates
variant value.ReverseTokenFilter
reverse()
Get thereverse
variant value.void
serialize(jakarta.json.stream.JsonGenerator generator, JsonpMapper mapper)
protected static void
setupTokenFilterDefinitionDeserializer(ObjectDeserializer<TokenFilterDefinition.Builder> op)
ShingleTokenFilter
shingle()
Get theshingle
variant value.SnowballTokenFilter
snowball()
Get thesnowball
variant value.StemmerTokenFilter
stemmer()
Get thestemmer
variant value.StemmerOverrideTokenFilter
stemmerOverride()
Get thestemmer_override
variant value.StopTokenFilter
stop()
Get thestop
variant value.SynonymTokenFilter
synonym()
Get thesynonym
variant value.SynonymGraphTokenFilter
synonymGraph()
Get thesynonym_graph
variant value.java.lang.String
toString()
TrimTokenFilter
trim()
Get thetrim
variant value.TruncateTokenFilter
truncate()
Get thetruncate
variant value.UniqueTokenFilter
unique()
Get theunique
variant value.UppercaseTokenFilter
uppercase()
Get theuppercase
variant value.WordDelimiterTokenFilter
wordDelimiter()
Get theword_delimiter
variant value.WordDelimiterGraphTokenFilter
wordDelimiterGraph()
Get theword_delimiter_graph
variant value.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Field Details
-
_DESERIALIZER
-
-
Constructor Details
-
TokenFilterDefinition
-
TokenFilterDefinition
Build a custom plugin-definedTokenFilterDefinition
, given its kind and some JSON data
-
-
Method Details
-
_kind
Description copied from interface:TaggedUnion
Get the of the kind of variant held by this object.- Specified by:
_kind
in interfaceTaggedUnion<TokenFilterDefinition.Kind,java.lang.Object>
- Returns:
- the variant kind
-
_get
public final java.lang.Object _get()- Specified by:
_get
in interfaceTaggedUnion<TokenFilterDefinition.Kind,java.lang.Object>
-
of
public static TokenFilterDefinition of(java.util.function.Function<TokenFilterDefinition.Builder,ObjectBuilder<TokenFilterDefinition>> fn) -
isAsciifolding
public boolean isAsciifolding()Is this variant instance of kindasciifolding
? -
asciifolding
Get theasciifolding
variant value.- Throws:
java.lang.IllegalStateException
- if the current variant is not of theasciifolding
kind.
-
isCommonGrams
public boolean isCommonGrams()Is this variant instance of kindcommon_grams
? -
commonGrams
Get thecommon_grams
variant value.- Throws:
java.lang.IllegalStateException
- if the current variant is not of thecommon_grams
kind.
-
isCondition
public boolean isCondition()Is this variant instance of kindcondition
? -
condition
Get thecondition
variant value.- Throws:
java.lang.IllegalStateException
- if the current variant is not of thecondition
kind.
-
isDelimitedPayload
public boolean isDelimitedPayload()Is this variant instance of kinddelimited_payload
? -
delimitedPayload
Get thedelimited_payload
variant value.- Throws:
java.lang.IllegalStateException
- if the current variant is not of thedelimited_payload
kind.
-
isDictionaryDecompounder
public boolean isDictionaryDecompounder()Is this variant instance of kinddictionary_decompounder
? -
dictionaryDecompounder
Get thedictionary_decompounder
variant value.- Throws:
java.lang.IllegalStateException
- if the current variant is not of thedictionary_decompounder
kind.
-
isEdgeNgram
public boolean isEdgeNgram()Is this variant instance of kindedge_ngram
? -
edgeNgram
Get theedge_ngram
variant value.- Throws:
java.lang.IllegalStateException
- if the current variant is not of theedge_ngram
kind.
-
isElision
public boolean isElision()Is this variant instance of kindelision
? -
elision
Get theelision
variant value.- Throws:
java.lang.IllegalStateException
- if the current variant is not of theelision
kind.
-
isFingerprint
public boolean isFingerprint()Is this variant instance of kindfingerprint
? -
fingerprint
Get thefingerprint
variant value.- Throws:
java.lang.IllegalStateException
- if the current variant is not of thefingerprint
kind.
-
isHunspell
public boolean isHunspell()Is this variant instance of kindhunspell
? -
hunspell
Get thehunspell
variant value.- Throws:
java.lang.IllegalStateException
- if the current variant is not of thehunspell
kind.
-
isHyphenationDecompounder
public boolean isHyphenationDecompounder()Is this variant instance of kindhyphenation_decompounder
? -
hyphenationDecompounder
Get thehyphenation_decompounder
variant value.- Throws:
java.lang.IllegalStateException
- if the current variant is not of thehyphenation_decompounder
kind.
-
isIcuCollation
public boolean isIcuCollation()Is this variant instance of kindicu_collation
? -
icuCollation
Get theicu_collation
variant value.- Throws:
java.lang.IllegalStateException
- if the current variant is not of theicu_collation
kind.
-
isIcuFolding
public boolean isIcuFolding()Is this variant instance of kindicu_folding
? -
icuFolding
Get theicu_folding
variant value.- Throws:
java.lang.IllegalStateException
- if the current variant is not of theicu_folding
kind.
-
isIcuNormalizer
public boolean isIcuNormalizer()Is this variant instance of kindicu_normalizer
? -
icuNormalizer
Get theicu_normalizer
variant value.- Throws:
java.lang.IllegalStateException
- if the current variant is not of theicu_normalizer
kind.
-
isIcuTokenizer
public boolean isIcuTokenizer()Is this variant instance of kindicu_tokenizer
? -
icuTokenizer
Get theicu_tokenizer
variant value.- Throws:
java.lang.IllegalStateException
- if the current variant is not of theicu_tokenizer
kind.
-
isIcuTransform
public boolean isIcuTransform()Is this variant instance of kindicu_transform
? -
icuTransform
Get theicu_transform
variant value.- Throws:
java.lang.IllegalStateException
- if the current variant is not of theicu_transform
kind.
-
isKstem
public boolean isKstem()Is this variant instance of kindkstem
? -
kstem
Get thekstem
variant value.- Throws:
java.lang.IllegalStateException
- if the current variant is not of thekstem
kind.
-
isKeepTypes
public boolean isKeepTypes()Is this variant instance of kindkeep_types
? -
keepTypes
Get thekeep_types
variant value.- Throws:
java.lang.IllegalStateException
- if the current variant is not of thekeep_types
kind.
-
isKeep
public boolean isKeep()Is this variant instance of kindkeep
? -
keep
Get thekeep
variant value.- Throws:
java.lang.IllegalStateException
- if the current variant is not of thekeep
kind.
-
isKeywordMarker
public boolean isKeywordMarker()Is this variant instance of kindkeyword_marker
? -
keywordMarker
Get thekeyword_marker
variant value.- Throws:
java.lang.IllegalStateException
- if the current variant is not of thekeyword_marker
kind.
-
isKuromojiPartOfSpeech
public boolean isKuromojiPartOfSpeech()Is this variant instance of kindkuromoji_part_of_speech
? -
kuromojiPartOfSpeech
Get thekuromoji_part_of_speech
variant value.- Throws:
java.lang.IllegalStateException
- if the current variant is not of thekuromoji_part_of_speech
kind.
-
isKuromojiReadingform
public boolean isKuromojiReadingform()Is this variant instance of kindkuromoji_readingform
? -
kuromojiReadingform
Get thekuromoji_readingform
variant value.- Throws:
java.lang.IllegalStateException
- if the current variant is not of thekuromoji_readingform
kind.
-
isKuromojiStemmer
public boolean isKuromojiStemmer()Is this variant instance of kindkuromoji_stemmer
? -
kuromojiStemmer
Get thekuromoji_stemmer
variant value.- Throws:
java.lang.IllegalStateException
- if the current variant is not of thekuromoji_stemmer
kind.
-
isLength
public boolean isLength()Is this variant instance of kindlength
? -
length
Get thelength
variant value.- Throws:
java.lang.IllegalStateException
- if the current variant is not of thelength
kind.
-
isLimit
public boolean isLimit()Is this variant instance of kindlimit
? -
limit
Get thelimit
variant value.- Throws:
java.lang.IllegalStateException
- if the current variant is not of thelimit
kind.
-
isLowercase
public boolean isLowercase()Is this variant instance of kindlowercase
? -
lowercase
Get thelowercase
variant value.- Throws:
java.lang.IllegalStateException
- if the current variant is not of thelowercase
kind.
-
isMultiplexer
public boolean isMultiplexer()Is this variant instance of kindmultiplexer
? -
multiplexer
Get themultiplexer
variant value.- Throws:
java.lang.IllegalStateException
- if the current variant is not of themultiplexer
kind.
-
isNgram
public boolean isNgram()Is this variant instance of kindngram
? -
ngram
Get thengram
variant value.- Throws:
java.lang.IllegalStateException
- if the current variant is not of thengram
kind.
-
isNoriPartOfSpeech
public boolean isNoriPartOfSpeech()Is this variant instance of kindnori_part_of_speech
? -
noriPartOfSpeech
Get thenori_part_of_speech
variant value.- Throws:
java.lang.IllegalStateException
- if the current variant is not of thenori_part_of_speech
kind.
-
isPatternCapture
public boolean isPatternCapture()Is this variant instance of kindpattern_capture
? -
patternCapture
Get thepattern_capture
variant value.- Throws:
java.lang.IllegalStateException
- if the current variant is not of thepattern_capture
kind.
-
isPatternReplace
public boolean isPatternReplace()Is this variant instance of kindpattern_replace
? -
patternReplace
Get thepattern_replace
variant value.- Throws:
java.lang.IllegalStateException
- if the current variant is not of thepattern_replace
kind.
-
isPhonetic
public boolean isPhonetic()Is this variant instance of kindphonetic
? -
phonetic
Get thephonetic
variant value.- Throws:
java.lang.IllegalStateException
- if the current variant is not of thephonetic
kind.
-
isPorterStem
public boolean isPorterStem()Is this variant instance of kindporter_stem
? -
porterStem
Get theporter_stem
variant value.- Throws:
java.lang.IllegalStateException
- if the current variant is not of theporter_stem
kind.
-
isPredicateTokenFilter
public boolean isPredicateTokenFilter()Is this variant instance of kindpredicate_token_filter
? -
predicateTokenFilter
Get thepredicate_token_filter
variant value.- Throws:
java.lang.IllegalStateException
- if the current variant is not of thepredicate_token_filter
kind.
-
isRemoveDuplicates
public boolean isRemoveDuplicates()Is this variant instance of kindremove_duplicates
? -
removeDuplicates
Get theremove_duplicates
variant value.- Throws:
java.lang.IllegalStateException
- if the current variant is not of theremove_duplicates
kind.
-
isReverse
public boolean isReverse()Is this variant instance of kindreverse
? -
reverse
Get thereverse
variant value.- Throws:
java.lang.IllegalStateException
- if the current variant is not of thereverse
kind.
-
isShingle
public boolean isShingle()Is this variant instance of kindshingle
? -
shingle
Get theshingle
variant value.- Throws:
java.lang.IllegalStateException
- if the current variant is not of theshingle
kind.
-
isSnowball
public boolean isSnowball()Is this variant instance of kindsnowball
? -
snowball
Get thesnowball
variant value.- Throws:
java.lang.IllegalStateException
- if the current variant is not of thesnowball
kind.
-
isStemmerOverride
public boolean isStemmerOverride()Is this variant instance of kindstemmer_override
? -
stemmerOverride
Get thestemmer_override
variant value.- Throws:
java.lang.IllegalStateException
- if the current variant is not of thestemmer_override
kind.
-
isStemmer
public boolean isStemmer()Is this variant instance of kindstemmer
? -
stemmer
Get thestemmer
variant value.- Throws:
java.lang.IllegalStateException
- if the current variant is not of thestemmer
kind.
-
isStop
public boolean isStop()Is this variant instance of kindstop
? -
stop
Get thestop
variant value.- Throws:
java.lang.IllegalStateException
- if the current variant is not of thestop
kind.
-
isSynonymGraph
public boolean isSynonymGraph()Is this variant instance of kindsynonym_graph
? -
synonymGraph
Get thesynonym_graph
variant value.- Throws:
java.lang.IllegalStateException
- if the current variant is not of thesynonym_graph
kind.
-
isSynonym
public boolean isSynonym()Is this variant instance of kindsynonym
? -
synonym
Get thesynonym
variant value.- Throws:
java.lang.IllegalStateException
- if the current variant is not of thesynonym
kind.
-
isTrim
public boolean isTrim()Is this variant instance of kindtrim
? -
trim
Get thetrim
variant value.- Throws:
java.lang.IllegalStateException
- if the current variant is not of thetrim
kind.
-
isTruncate
public boolean isTruncate()Is this variant instance of kindtruncate
? -
truncate
Get thetruncate
variant value.- Throws:
java.lang.IllegalStateException
- if the current variant is not of thetruncate
kind.
-
isUnique
public boolean isUnique()Is this variant instance of kindunique
? -
unique
Get theunique
variant value.- Throws:
java.lang.IllegalStateException
- if the current variant is not of theunique
kind.
-
isUppercase
public boolean isUppercase()Is this variant instance of kinduppercase
? -
uppercase
Get theuppercase
variant value.- Throws:
java.lang.IllegalStateException
- if the current variant is not of theuppercase
kind.
-
isWordDelimiterGraph
public boolean isWordDelimiterGraph()Is this variant instance of kindword_delimiter_graph
? -
wordDelimiterGraph
Get theword_delimiter_graph
variant value.- Throws:
java.lang.IllegalStateException
- if the current variant is not of theword_delimiter_graph
kind.
-
isWordDelimiter
public boolean isWordDelimiter()Is this variant instance of kindword_delimiter
? -
wordDelimiter
Get theword_delimiter
variant value.- Throws:
java.lang.IllegalStateException
- if the current variant is not of theword_delimiter
kind.
-
_isCustom
public boolean _isCustom()Is this a customTokenFilterDefinition
defined by a plugin? -
_customKind
@Nullable public final java.lang.String _customKind()Get the actual kind when_kind()
equalsTokenFilterDefinition.Kind._Custom
(plugin-defined variant).- Specified by:
_customKind
in interfaceOpenTaggedUnion<TokenFilterDefinition.Kind,java.lang.Object>
-
_custom
Get the custom plugin-defined variant value.- Throws:
java.lang.IllegalStateException
- if the current variant is notTokenFilterDefinition.Kind._Custom
.
-
serialize
- Specified by:
serialize
in interfaceJsonpSerializable
-
toString
public java.lang.String toString()- Overrides:
toString
in classjava.lang.Object
-
setupTokenFilterDefinitionDeserializer
protected static void setupTokenFilterDefinitionDeserializer(ObjectDeserializer<TokenFilterDefinition.Builder> op)
-