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
  • Field Details

  • Method Details

    • isCompletion

      public boolean isCompletion()
      Is this SuggestContainer of a completion kind?
    • completion

      public CompletionSuggester completion()
      Get the completion variant value.
      Throws:
      java.lang.IllegalStateException - if the current variant is not of the completion kind.
    • isPhrase

      public boolean isPhrase()
      Is this SuggestContainer of a phrase kind?
    • phrase

      public PhraseSuggester phrase()
      Get the phrase variant value.
      Throws:
      java.lang.IllegalStateException - if the current variant is not of the phrase kind.
    • isPrefix

      public boolean isPrefix()
      Is this SuggestContainer of a prefix kind?
    • prefix

      public java.lang.String prefix()
      Get the prefix variant value.
      Throws:
      java.lang.IllegalStateException - if the current variant is not of the prefix kind.
    • isRegex

      public boolean isRegex()
      Is this SuggestContainer of a regex kind?
    • regex

      public java.lang.String regex()
      Get the regex variant value.
      Throws:
      java.lang.IllegalStateException - if the current variant is not of the regex kind.
    • isTerm

      public boolean isTerm()
      Is this SuggestContainer of a term kind?
    • term

      public TermSuggester term()
      Get the term variant value.
      Throws:
      java.lang.IllegalStateException - if the current variant is not of the term kind.
    • isText

      public boolean isText()
      Is this SuggestContainer of a text kind?
    • text

      public java.lang.String text()
      Get the text variant value.
      Throws:
      java.lang.IllegalStateException - if the current variant is not of the text kind.
    • toJsonp

      public void toJsonp​(jakarta.json.stream.JsonGenerator generator, JsonpMapper mapper)
      Specified by:
      toJsonp in interface ToJsonp