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,org.elasticsearch.core.Releasable
RerankOperator is an inference operator that compute scores for rows using a reranking model.-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final recordFactory for creatingRerankOperatorinstancesNested classes/interfaces inherited from class org.elasticsearch.xpack.esql.inference.InferenceOperator
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
Fields inherited from interface org.elasticsearch.compute.operator.Operator
MIN_TARGET_PAGE_SIZE, NOT_BLOCKED, TARGET_PAGE_SIZE -
Constructor Summary
ConstructorsConstructorDescriptionRerankOperator(DriverContext driverContext, BulkInferenceRunner bulkInferenceRunner, String inferenceId, String queryText, EvalOperator.ExpressionEvaluator rowEncoder, int scoreChannel, int maxOutstandingPages) -
Method Summary
Modifier and TypeMethodDescriptionprotected voiddoClose()protected org.elasticsearch.xpack.esql.inference.rerank.RerankOperatorOutputBuilderoutputBuilder(Page input) Returns the output builder responsible for collecting inference responses and building the output page.protected org.elasticsearch.xpack.esql.inference.rerank.RerankOperatorRequestIteratorReturns the request iterator responsible for batching and converting input rows into inference requests.toString()Methods inherited from class org.elasticsearch.xpack.esql.inference.InferenceOperator
blockFactory, getOutput, inferenceId, performAsync, releaseFetchedOnAnyThreadMethods inherited from class org.elasticsearch.compute.operator.AsyncOperator
addInput, close, fetchFromBuffer, finish, isBlocked, isFinished, needsInput, releasePageOnAnyThread, status, status
-
Constructor Details
-
RerankOperator
public RerankOperator(DriverContext driverContext, BulkInferenceRunner bulkInferenceRunner, String inferenceId, String queryText, EvalOperator.ExpressionEvaluator rowEncoder, int scoreChannel, int maxOutstandingPages)
-
-
Method Details
-
doClose
protected void doClose()- Specified by:
doClosein classAsyncOperator<InferenceOperator.OngoingInferenceResult>
-
toString
-
requests
protected org.elasticsearch.xpack.esql.inference.rerank.RerankOperatorRequestIterator requests(Page inputPage) Returns the request iterator responsible for batching and converting input rows into inference requests.- Specified by:
requestsin classInferenceOperator- Parameters:
inputPage- The input page to process.
-
outputBuilder
protected org.elasticsearch.xpack.esql.inference.rerank.RerankOperatorOutputBuilder outputBuilder(Page input) Returns the output builder responsible for collecting inference responses and building the output page.- Specified by:
outputBuilderin classInferenceOperator- Parameters:
input- The corresponding input page used to generate the inference requests.
-