java.lang.Object
org.elasticsearch.compute.operator.CompleteInputCollectorOperator
org.elasticsearch.compute.operator.MMROperator
- All Implemented Interfaces:
Closeable,AutoCloseable,Operator,org.elasticsearch.core.Releasable
ES|QL Operator for performing MMR result diversification
MMR performs result diversification on incoming results using maximum marginal relevance.
The input is a set of limited rows, where at least one field is a dense vector to use for vector comparison.
The output is a reduced set of results, in the same order as the input, but "diversified" to be results that are semantically
diverse from each other within the input set.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final recordFactor creation for the MMR Operatorstatic final recordstatic classstatic classstatic final recordNested classes/interfaces inherited from interface org.elasticsearch.compute.operator.Operator
Operator.OperatorFactory -
Field Summary
Fields inherited from class org.elasticsearch.compute.operator.CompleteInputCollectorOperator
finished, inputPages, pagesReceived, rowsReceivedFields inherited from interface org.elasticsearch.compute.operator.Operator
MIN_TARGET_PAGE_SIZE, NOT_BLOCKED, TARGET_PAGE_SIZE -
Method Summary
Modifier and TypeMethodDescriptionbooleanReturns true if the operator can produce more output pages without requiring additional input pages.protected booleanAdds any additional checks to ensure the subclass is finishedprotected voidonClose()Additional implementation for closing out the subclassprotected voidCalled when he base finish() call is completedprotected PageImplementation to retrieve the output pages.status()The status of the operator.toString()Methods inherited from class org.elasticsearch.compute.operator.CompleteInputCollectorOperator
addInput, close, finish, getOutput, isFinished, needsInput
-
Method Details
-
onFinished
protected void onFinished()Description copied from class:CompleteInputCollectorOperatorCalled when he base finish() call is completed- Specified by:
onFinishedin classCompleteInputCollectorOperator
-
isOperatorFinished
protected boolean isOperatorFinished()Description copied from class:CompleteInputCollectorOperatorAdds any additional checks to ensure the subclass is finished- Specified by:
isOperatorFinishedin classCompleteInputCollectorOperator- Returns:
- true if the subclass is finished
-
onGetOutput
Description copied from class:CompleteInputCollectorOperatorImplementation to retrieve the output pages. Will only run if `isFinished()` is true- Specified by:
onGetOutputin classCompleteInputCollectorOperator- Returns:
- the output page (or null if not ready or none)
-
onClose
protected void onClose()Description copied from class:CompleteInputCollectorOperatorAdditional implementation for closing out the subclass- Specified by:
onClosein classCompleteInputCollectorOperator
-
toString
-
canProduceMoreDataWithoutExtraInput
public boolean canProduceMoreDataWithoutExtraInput()Description copied from interface:OperatorReturns true if the operator can produce more output pages without requiring additional input pages. This is useful for operators that buffer data or have internal state that can produce multiple output pages.Operators that do not buffer data should return
false- they cannot produce pages out of thin air. Examples of operators that may returntrue:- Operators with internal buffers (e.g.,
AsyncOperatorwith pending results) - Operators processing a single input page into multiple output pages
- Aggregation operators that buffer partial results
- Returns:
trueif the operator has buffered data that can produce output,falseotherwise
- Operators with internal buffers (e.g.,
-
status
Description copied from interface:OperatorThe status of the operator.
-