Module org.elasticsearch.compute
Class LuceneCountOperator
java.lang.Object
org.elasticsearch.compute.operator.SourceOperator
org.elasticsearch.compute.lucene.query.LuceneOperator
org.elasticsearch.compute.lucene.query.LuceneCountOperator
- All Implemented Interfaces:
Closeable,AutoCloseable,Operator,Releasable
Source operator that incrementally counts the results in Lucene searches
Returns always one entry that mimics the Count aggregation internal state:
1. the count as a long (0 if no doc is seen)
2. a bool flag (seen) that's always true meaning that the group (all items) always exists
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from class org.elasticsearch.compute.lucene.query.LuceneOperator
LuceneOperator.StatusNested 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
Fields inherited from class org.elasticsearch.compute.lucene.query.LuceneOperator
blockFactory, currentSlice, NO_LIMIT, refCounteds, SMALL_INDEX_BOUNDARYFields inherited from interface org.elasticsearch.compute.operator.Operator
MIN_TARGET_PAGE_SIZE, NOT_BLOCKED, TARGET_PAGE_SIZE -
Constructor Summary
ConstructorsConstructorDescriptionLuceneCountOperator(IndexedByShardId<? extends RefCounted> shardRefCounters, DriverContext driverContext, LuceneSliceQueue sliceQueue, List<ElementType> tagTypes, int limit, LongSupplier directoryBytesRead) -
Method Summary
Methods inherited from class org.elasticsearch.compute.lucene.query.LuceneOperator
additionalClose, close, getOutput, getSliceQueue, isBlocked, shardLoadDelta, status, toStringMethods 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
tryPromote
-
Constructor Details
-
LuceneCountOperator
public LuceneCountOperator(IndexedByShardId<? extends RefCounted> shardRefCounters, DriverContext driverContext, LuceneSliceQueue sliceQueue, List<ElementType> tagTypes, int limit, LongSupplier directoryBytesRead)
-
-
Method Details
-
isFinished
public boolean isFinished()Description copied from interface:Operatorwhether the operator has finished processing all input pages and made the corresponding output pages available -
finish
public void finish()Description copied from interface:Operatornotifies the operator that it won't receive any more input pages -
getCheckedOutput
- Specified by:
getCheckedOutputin classLuceneOperator- Throws:
IOException
-
describe
- Specified by:
describein classLuceneOperator
-