Class Retriever

java.lang.Object
co.elastic.clients.elasticsearch._types.Retriever
All Implemented Interfaces:
JsonpSerializable, TaggedUnion<Retriever.Kind,Object>

See Also:
  • Field Details

  • Constructor Details

  • Method Details

    • _kind

      public final Retriever.Kind _kind()
      Description copied from interface: TaggedUnion
      Get the of the kind of variant held by this object.
      Specified by:
      _kind in interface TaggedUnion<Retriever.Kind,Object>
      Returns:
      the variant kind
    • _get

      public final Object _get()
      Specified by:
      _get in interface TaggedUnion<Retriever.Kind,Object>
    • of

    • isStandard

      public boolean isStandard()
      Is this variant instance of kind standard?
    • standard

      public StandardRetriever standard()
      Get the standard variant value.
      Throws:
      IllegalStateException - if the current variant is not of the standard kind.
    • isKnn

      public boolean isKnn()
      Is this variant instance of kind knn?
    • knn

      public KnnRetriever knn()
      Get the knn variant value.
      Throws:
      IllegalStateException - if the current variant is not of the knn kind.
    • isRrf

      public boolean isRrf()
      Is this variant instance of kind rrf?
    • rrf

      public RRFRetriever rrf()
      Get the rrf variant value.
      Throws:
      IllegalStateException - if the current variant is not of the rrf kind.
    • isTextSimilarityReranker

      public boolean isTextSimilarityReranker()
      Is this variant instance of kind text_similarity_reranker?
    • textSimilarityReranker

      public TextSimilarityReranker textSimilarityReranker()
      Get the text_similarity_reranker variant value.
      Throws:
      IllegalStateException - if the current variant is not of the text_similarity_reranker kind.
    • isRule

      public boolean isRule()
      Is this variant instance of kind rule?
    • rule

      public RuleRetriever rule()
      Get the rule variant value.
      Throws:
      IllegalStateException - if the current variant is not of the rule kind.
    • isRescorer

      public boolean isRescorer()
      Is this variant instance of kind rescorer?
    • rescorer

      public RescorerRetriever rescorer()
      Get the rescorer variant value.
      Throws:
      IllegalStateException - if the current variant is not of the rescorer kind.
    • isLinear

      public boolean isLinear()
      Is this variant instance of kind linear?
    • linear

      public LinearRetriever linear()
      Get the linear variant value.
      Throws:
      IllegalStateException - if the current variant is not of the linear kind.
    • isPinned

      public boolean isPinned()
      Is this variant instance of kind pinned?
    • pinned

      public PinnedRetriever pinned()
      Get the pinned variant value.
      Throws:
      IllegalStateException - if the current variant is not of the pinned kind.
    • isDiversify

      public boolean isDiversify()
      Is this variant instance of kind diversify?
    • diversify

      public DiversifyRetriever diversify()
      Get the diversify variant value.
      Throws:
      IllegalStateException - if the current variant is not of the diversify kind.
    • serialize

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

      public String toString()
      Overrides:
      toString in class Object
    • setupRetrieverDeserializer

      protected static void setupRetrieverDeserializer(ObjectDeserializer<Retriever.Builder> op)