Module org.elasticsearch.compute
Package org.elasticsearch.compute.lucene
Class LuceneTopNSourceOperator
java.lang.Object
org.elasticsearch.compute.operator.SourceOperator
org.elasticsearch.compute.lucene.LuceneOperator
org.elasticsearch.compute.lucene.LuceneTopNSourceOperator
- All Implemented Interfaces:
Closeable,AutoCloseable,Operator,org.elasticsearch.core.Releasable
Source operator that builds Pages out of the output of a TopFieldCollector (aka TopN).
Makes Pages of the shape (docBlock) or (docBlock, score).
Lucene loads the sort keys, but we don't read them from lucene. Yet. We should.
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from class org.elasticsearch.compute.lucene.LuceneOperator
LuceneOperator.StatusNested classes/interfaces inherited from class org.elasticsearch.compute.operator.SourceOperator
SourceOperator.SourceOperatorFactoryNested classes/interfaces inherited from interface org.elasticsearch.compute.operator.Operator
Operator.OperatorFactory -
Field Summary
Fields inherited from class org.elasticsearch.compute.lucene.LuceneOperator
blockFactory, NO_LIMITFields inherited from interface org.elasticsearch.compute.operator.Operator
MIN_TARGET_PAGE_SIZE, NOT_BLOCKED, TARGET_PAGE_SIZE -
Constructor Summary
ConstructorsConstructorDescriptionLuceneTopNSourceOperator(CircuitBreaker breaker, BlockFactory blockFactory, int maxPageSize, List<SortBuilder<?>> sorts, long estimatedPerRowSortSize, int limit, LuceneSliceQueue sliceQueue, org.apache.lucene.search.ScoreMode scoreMode) -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()notifies the operator that it won't be used anymore (i.e.protected voidvoidfinish()notifies the operator that it won't receive any more input pagesbooleanwhether the operator has finished processing all input pages and made the corresponding output pages availableMethods inherited from class org.elasticsearch.compute.lucene.LuceneOperator
getOutput, status, toStringMethods inherited from class org.elasticsearch.compute.operator.SourceOperator
addInput, needsInput
-
Constructor Details
-
LuceneTopNSourceOperator
public LuceneTopNSourceOperator(CircuitBreaker breaker, BlockFactory blockFactory, int maxPageSize, List<SortBuilder<?>> sorts, long estimatedPerRowSortSize, int limit, LuceneSliceQueue sliceQueue, org.apache.lucene.search.ScoreMode scoreMode)
-
-
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
-
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- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Specified by:
closein interfaceOperator- Specified by:
closein interfaceorg.elasticsearch.core.Releasable- Overrides:
closein classLuceneOperator
-