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

public abstract class LuceneOperator extends SourceOperator
  • Field Details

  • Constructor Details

  • Method Details

    • getOutput

      public final Page getOutput()
      Description copied from interface: Operator
      returns non-null if output page available. Only called when isFinished() == false
    • getCheckedOutput

      protected abstract Page getCheckedOutput() throws IOException
      Throws:
      IOException
    • close

      public final void close()
      Description copied from interface: Operator
      notifies 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

      protected LuceneSliceQueue getSliceQueue()
    • shardLoadDelta

      protected List<SourceOperator.ShardLoad> shardLoadDelta(long now)
      Description copied from class: SourceOperator
      Returns a snapshot of shard load accumulated since the previous invocation.

      This method is meant to be overridden by SourceOperator implementations 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:
      shardLoadDelta in class SourceOperator
      Returns:
      list of per-shard load since the last call
    • isBlocked

      public IsBlockedResult isBlocked()
      Description copied from interface: Operator
      An 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 returns Operator.NOT_BLOCKED which is an already completed future.
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • describe

      protected abstract void describe(StringBuilder sb)
    • status

      public Operator.Status status()
      Description copied from interface: Operator
      The status of the operator.