Class SuggestContainer
java.lang.Object
org.opensearch.client.util.TaggedUnion<SuggestContainer.Tag,java.lang.Object>
org.opensearch.client.opensearch._global.search.SuggestContainer
- All Implemented Interfaces:
ToJsonp
public class SuggestContainer extends TaggedUnion<SuggestContainer.Tag,java.lang.Object> implements ToJsonp
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
SuggestContainer.Builder
static class
SuggestContainer.Tag
-
Field Summary
Fields Modifier and Type Field Description static JsonpDeserializer<SuggestContainer>
DESERIALIZER
-
Method Summary
Modifier and Type Method Description CompletionSuggester
completion()
Get thecompletion
variant value.boolean
isCompletion()
Is thisSuggestContainer
of acompletion
kind?boolean
isPhrase()
Is thisSuggestContainer
of aphrase
kind?boolean
isPrefix()
Is thisSuggestContainer
of aprefix
kind?boolean
isRegex()
Is thisSuggestContainer
of aregex
kind?boolean
isTerm()
Is thisSuggestContainer
of aterm
kind?boolean
isText()
Is thisSuggestContainer
of atext
kind?PhraseSuggester
phrase()
Get thephrase
variant value.java.lang.String
prefix()
Get theprefix
variant value.java.lang.String
regex()
Get theregex
variant value.TermSuggester
term()
Get theterm
variant value.java.lang.String
text()
Get thetext
variant value.void
toJsonp(jakarta.json.stream.JsonGenerator generator, JsonpMapper mapper)
-
Field Details
-
Method Details
-
isCompletion
public boolean isCompletion()Is thisSuggestContainer
of acompletion
kind? -
completion
Get thecompletion
variant value.- Throws:
java.lang.IllegalStateException
- if the current variant is not of thecompletion
kind.
-
isPhrase
public boolean isPhrase()Is thisSuggestContainer
of aphrase
kind? -
phrase
Get thephrase
variant value.- Throws:
java.lang.IllegalStateException
- if the current variant is not of thephrase
kind.
-
isPrefix
public boolean isPrefix()Is thisSuggestContainer
of aprefix
kind? -
prefix
public java.lang.String prefix()Get theprefix
variant value.- Throws:
java.lang.IllegalStateException
- if the current variant is not of theprefix
kind.
-
isRegex
public boolean isRegex()Is thisSuggestContainer
of aregex
kind? -
regex
public java.lang.String regex()Get theregex
variant value.- Throws:
java.lang.IllegalStateException
- if the current variant is not of theregex
kind.
-
isTerm
public boolean isTerm()Is thisSuggestContainer
of aterm
kind? -
term
Get theterm
variant value.- Throws:
java.lang.IllegalStateException
- if the current variant is not of theterm
kind.
-
isText
public boolean isText()Is thisSuggestContainer
of atext
kind? -
text
public java.lang.String text()Get thetext
variant value.- Throws:
java.lang.IllegalStateException
- if the current variant is not of thetext
kind.
-
toJsonp
-