java.lang.Object
co.elastic.clients.elasticsearch._core.search.Suggest
All Implemented Interfaces:
JsonpSerializable, TaggedUnion<java.lang.Object>

@JsonpDeserializable
public class Suggest
extends java.lang.Object
implements TaggedUnion<java.lang.Object>, JsonpSerializable
  • Field Details

  • Constructor Details

  • Method Details

    • _type

      public java.lang.String _type()
      Description copied from interface: TaggedUnion
      Get the of the type of the variant held by this union object.
      Specified by:
      _type in interface TaggedUnion<java.lang.Object>
      Returns:
      the variant type
    • _get

      public java.lang.Object _get()
      Specified by:
      _get in interface TaggedUnion<java.lang.Object>
    • completion

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

      public PhraseSuggester phrase()
      Get the phrase variant value.
      Throws:
      java.lang.IllegalStateException - if the current variant is not of the phrase 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.
    • 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.
    • term

      public TermSuggester term()
      Get the term variant value.
      Throws:
      java.lang.IllegalStateException - if the current variant is not of the term 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.
    • serialize

      public void serialize​(jakarta.json.stream.JsonGenerator generator, JsonpMapper mapper)
      Specified by:
      serialize in interface JsonpSerializable
    • setupSuggestDeserializer

      protected static void setupSuggestDeserializer​(DelegatingDeserializer<Suggest.Builder> op)