Class LuceneTopNSourceOperator

All Implemented Interfaces:
Closeable, AutoCloseable, Operator, org.elasticsearch.core.Releasable

public final class LuceneTopNSourceOperator extends LuceneOperator
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.

  • Constructor Details

    • LuceneTopNSourceOperator

      public LuceneTopNSourceOperator(IndexedByShardId<? extends ShardContext> contexts, DriverContext driverContext, int maxPageSize, List<SortBuilder<?>> sorts, long estimatedPerRowSortSize, int limit, LuceneSliceQueue sliceQueue, boolean needsScore, org.elasticsearch.compute.lucene.query.LuceneTopNSourceOperator.PerShardCollectorProvider perShardCollectorProvider)
  • Method Details

    • isFinished

      public boolean isFinished()
      Description copied from interface: Operator
      whether the operator has finished processing all input pages and made the corresponding output pages available
    • finish

      public void finish()
      Description copied from interface: Operator
      notifies the operator that it won't receive any more input pages
    • getCheckedOutput

      public Page getCheckedOutput() throws IOException
      Specified by:
      getCheckedOutput in class LuceneOperator
      Throws:
      IOException
    • describe

      protected void describe(StringBuilder sb)
      Specified by:
      describe in class LuceneOperator
    • additionalClose

      protected void additionalClose()
      Overrides:
      additionalClose in class LuceneOperator