Module org.elasticsearch.compute
Class LookupQueryOperator
java.lang.Object
org.elasticsearch.compute.operator.lookup.LookupQueryOperator
- All Implemented Interfaces:
Closeable,AutoCloseable,Operator,org.elasticsearch.core.Releasable
Intermediate operator that processes match field pages from ExchangeSourceOperator
and generates queries to lookup document IDs.
This operator reads pages via addInput() and emits Pages consisting of a
DocVector
and IntBlock of positions for each query.
Similar to EnrichQuerySourceOperator but reads from exchange instead of a stored page.-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from interface org.elasticsearch.compute.operator.Operator
Operator.OperatorFactory -
Field Summary
FieldsFields inherited from interface org.elasticsearch.compute.operator.Operator
MIN_TARGET_PAGE_SIZE, NOT_BLOCKED, TARGET_PAGE_SIZE -
Constructor Summary
ConstructorsConstructorDescriptionLookupQueryOperator(BlockFactory blockFactory, int maxPageSize, LookupEnrichQueryGenerator queryList, IndexedByShardId<? extends ShardContext> shardContexts, int shardId, SearchExecutionContext searchExecutionContext, Warnings warnings, boolean emptyResult) -
Method Summary
Modifier and TypeMethodDescriptionvoidadds an input page to the operator.booleanReturns true if the operator can produce more output pages without requiring additional input pages.voidclose()notifies the operator that it won't be used anymore (i.e.voidfinish()notifies the operator that it won't receive any more input pagesreturns non-null if output page available.booleanwhether the operator has finished processing all input pages and made the corresponding output pages availablebooleanwhether the given operator can accept more input pagesstatus()The status of the operator.toString()
-
Field Details
-
DEFAULT_MAX_PAGE_SIZE
public static final int DEFAULT_MAX_PAGE_SIZE- See Also:
-
-
Constructor Details
-
LookupQueryOperator
public LookupQueryOperator(BlockFactory blockFactory, int maxPageSize, LookupEnrichQueryGenerator queryList, IndexedByShardId<? extends ShardContext> shardContexts, int shardId, SearchExecutionContext searchExecutionContext, Warnings warnings, boolean emptyResult)
-
-
Method Details
-
addInput
Description copied from interface:Operatoradds an input page to the operator. only called when needsInput() == true and isFinished() == false -
getOutput
Description copied from interface:Operatorreturns non-null if output page available. Only called when isFinished() == false -
finish
public void finish()Description copied from interface:Operatornotifies the operator that it won't receive any more input pages -
isFinished
public boolean isFinished()Description copied from interface:Operatorwhether the operator has finished processing all input pages and made the corresponding output pages available- Specified by:
isFinishedin interfaceOperator
-
needsInput
public boolean needsInput()Description copied from interface:Operatorwhether the given operator can accept more input pages- Specified by:
needsInputin interfaceOperator
-
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
- Specified by:
canProduceMoreDataWithoutExtraInputin interfaceOperator- Returns:
trueif the operator has buffered data that can produce output,falseotherwise
- Operators with internal buffers (e.g.,
-
close
public void close()Description copied from interface:Operatornotifies the operator that it won't be used anymore (i.e. none of the other methods called), and its resources can be cleaned up -
toString
-
status
Description copied from interface:OperatorThe status of the operator.
-