Class TextSimilarityReranker

java.lang.Object
co.elastic.clients.elasticsearch._types.RetrieverBase
co.elastic.clients.elasticsearch._types.TextSimilarityReranker
All Implemented Interfaces:
RetrieverVariant, JsonpSerializable

@JsonpDeserializable public class TextSimilarityReranker extends RetrieverBase implements RetrieverVariant
See Also:
  • Field Details

  • Method Details

    • of

    • _retrieverKind

      public Retriever.Kind _retrieverKind()
      Retriever variant kind.
      Specified by:
      _retrieverKind in interface RetrieverVariant
    • retriever

      public final Retriever retriever()
      Required - The nested retriever which will produce the first-level results, that will later be used for reranking.

      API name: retriever

    • rankWindowSize

      @Nullable public final Integer rankWindowSize()
      This value determines how many documents we will consider from the nested retriever.

      API name: rank_window_size

    • inferenceId

      @Nullable public final String inferenceId()
      Unique identifier of the inference endpoint created using the inference API.

      API name: inference_id

    • inferenceText

      public final String inferenceText()
      Required - The text snippet used as the basis for similarity comparison

      API name: inference_text

    • field

      public final String field()
      Required - The document field to be used for text similarity comparisons. This field should contain the text that will be evaluated against the inference_text

      API name: field

    • serializeInternal

      protected void serializeInternal(jakarta.json.stream.JsonGenerator generator, JsonpMapper mapper)
      Overrides:
      serializeInternal in class RetrieverBase
    • setupTextSimilarityRerankerDeserializer

      protected static void setupTextSimilarityRerankerDeserializer(ObjectDeserializer<TextSimilarityReranker.Builder> op)