Class RerankOperator
java.lang.Object
org.elasticsearch.compute.operator.AsyncOperator<InferenceOperator.OngoingInferenceResult>
org.elasticsearch.xpack.esql.inference.InferenceOperator
org.elasticsearch.xpack.esql.inference.rerank.RerankOperator
- All Implemented Interfaces:
Closeable,AutoCloseable,Operator,Releasable
RerankOperator is an InferenceOperator that computes relevance scores for rows using a reranking model.
It evaluates a row encoder expression for each input row, batches them together, and sends them to the reranking service
with a query text to obtain relevance scores using RerankAction.Request.
Dispatch routes to InferenceService.executeRerankInference(org.elasticsearch.xpack.core.inference.action.RerankAction.Request, org.elasticsearch.action.ActionListener<org.elasticsearch.xpack.core.inference.action.InferenceAction.Response>) via an overridden
dispatchInferenceRequest.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final recordFactory for creatingRerankOperatorinstances.Nested classes/interfaces inherited from class org.elasticsearch.xpack.esql.inference.InferenceOperator
InferenceOperator.BulkInferenceOperation, InferenceOperator.BulkInferenceRequestItem, InferenceOperator.BulkInferenceRequestItemIterator, InferenceOperator.BulkInferenceResponseItem, InferenceOperator.OngoingInferenceResult, InferenceOperator.OutputBuilderNested classes/interfaces inherited from class org.elasticsearch.compute.operator.AsyncOperator
AsyncOperator.StatusNested classes/interfaces inherited from interface org.elasticsearch.compute.operator.Operator
Operator.OperatorFactory -
Field Summary
FieldsFields inherited from class org.elasticsearch.xpack.esql.inference.InferenceOperator
DEFAULT_MAX_OUTSTANDING_PAGES, DEFAULT_MAX_OUTSTANDING_REQUESTSFields inherited from interface org.elasticsearch.compute.operator.Operator
MIN_TARGET_PAGE_SIZE, NOT_BLOCKED, TARGET_PAGE_SIZE -
Method Summary
Modifier and TypeMethodDescriptionprotected voiddispatchInferenceRequest(InferenceService inferenceService, BaseInferenceActionRequest request, ActionListener<InferenceAction.Response> listener) Dispatches an inference request to the appropriate InferenceService method.toString()Methods inherited from class org.elasticsearch.xpack.esql.inference.InferenceOperator
doClose, getOutput, inferenceId, performAsync, releaseFetchedOnAnyThreadMethods inherited from class org.elasticsearch.compute.operator.AsyncOperator
addInput, canProduceMoreDataWithoutExtraInput, close, fetchFromBuffer, finish, isBlocked, isFinished, needsInput, releasePageOnAnyThread, status, statusMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.elasticsearch.compute.operator.Operator
tryPromote
-
Field Details
-
DEFAULT_BATCH_SIZE
public static final int DEFAULT_BATCH_SIZE- See Also:
-
-
Method Details
-
dispatchInferenceRequest
protected void dispatchInferenceRequest(InferenceService inferenceService, BaseInferenceActionRequest request, ActionListener<InferenceAction.Response> listener) Description copied from class:InferenceOperatorDispatches an inference request to the appropriate InferenceService method. Subclasses may override this to route to a different service method (e.g.executeEmbeddingInference).- Overrides:
dispatchInferenceRequestin classInferenceOperator
-
toString
-