Module org.elasticsearch.compute
Class LuceneOperator
java.lang.Object
org.elasticsearch.compute.operator.SourceOperator
org.elasticsearch.compute.lucene.query.LuceneOperator
- All Implemented Interfaces:
Closeable,AutoCloseable,Operator,org.elasticsearch.core.Releasable
- Direct Known Subclasses:
LuceneCountOperator,LuceneSourceOperator,LuceneTopNSourceOperator
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classstatic classNested classes/interfaces inherited from class org.elasticsearch.compute.operator.SourceOperator
SourceOperator.ShardLoad, SourceOperator.SourceOperatorFactoryNested classes/interfaces inherited from interface org.elasticsearch.compute.operator.Operator
Operator.OperatorFactory -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final BlockFactoryprotected LuceneSlicestatic final intprotected final IndexedByShardId<? extends org.elasticsearch.core.RefCounted> static final intDataPartitioning.AUTOresolves toLuceneSliceQueue.PartitioningStrategy.SHARDfor indices with fewer than this many documents.Fields inherited from interface org.elasticsearch.compute.operator.Operator
MIN_TARGET_PAGE_SIZE, NOT_BLOCKED, TARGET_PAGE_SIZE -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedLuceneOperator(IndexedByShardId<? extends org.elasticsearch.core.RefCounted> refCounteds, BlockFactory blockFactory, int maxPageSize, LuceneSliceQueue sliceQueue) -
Method Summary
Modifier and TypeMethodDescriptionprotected voidfinal voidclose()notifies the operator that it won't be used anymore (i.e.protected abstract voidprotected abstract Pagefinal Pagereturns non-null if output page available.protected LuceneSliceQueueAn operator can be blocked on some action (e.g.protected List<SourceOperator.ShardLoad> shardLoadDelta(long now) Returns a snapshot of shard load accumulated since the previous invocation.status()The status of the operator.toString()Methods inherited from class org.elasticsearch.compute.operator.SourceOperator
addInput, canProduceMoreDataWithoutExtraInput, needsInputMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.elasticsearch.compute.operator.Operator
finish, isFinished
-
Field Details
-
NO_LIMIT
public static final int NO_LIMIT- See Also:
-
SMALL_INDEX_BOUNDARY
public static final int SMALL_INDEX_BOUNDARYDataPartitioning.AUTOresolves toLuceneSliceQueue.PartitioningStrategy.SHARDfor indices with fewer than this many documents.- See Also:
-
refCounteds
-
blockFactory
-
currentSlice
-
-
Constructor Details
-
LuceneOperator
protected LuceneOperator(IndexedByShardId<? extends org.elasticsearch.core.RefCounted> refCounteds, BlockFactory blockFactory, int maxPageSize, LuceneSliceQueue sliceQueue)
-
-
Method Details
-
getOutput
Description copied from interface:Operatorreturns non-null if output page available. Only called when isFinished() == false -
getCheckedOutput
- Throws:
IOException
-
close
public final 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 -
additionalClose
protected void additionalClose() -
getSliceQueue
-
shardLoadDelta
Description copied from class:SourceOperatorReturns a snapshot of shard load accumulated since the previous invocation.This method is meant to be overridden by
SourceOperatorimplementations that can attribute produced pages to shards or indices.The snapshot represents a delta: implementations must reset their internal counters after the snapshot is taken so that each invocation reports only the load observed since the last call.
Source operators that do not operate on shards or indices can ignore this mechanism and rely on the default implementation, which returns an empty list.
- Overrides:
shardLoadDeltain classSourceOperator- Returns:
- list of per-shard load since the last call
-
isBlocked
Description copied from interface:OperatorAn operator can be blocked on some action (e.g. waiting for some resources to become available). If so, it returns a future that completes when the operator becomes unblocked. If the operator is not blocked, this method returnsOperator.NOT_BLOCKEDwhich is an already completed future. -
toString
-
describe
-
status
Description copied from interface:OperatorThe status of the operator.
-