Class PayloadSpanCollector

java.lang.Object
org.apache.lucene.payloads.PayloadSpanCollector
All Implemented Interfaces:
SpanCollector

public class PayloadSpanCollector extends Object implements SpanCollector
SpanCollector for collecting payloads
  • Field Details

    • payloads

      private final Collection<byte[]> payloads
  • Constructor Details

    • PayloadSpanCollector

      public PayloadSpanCollector()
  • Method Details

    • collectLeaf

      public void collectLeaf(PostingsEnum postings, int position, Term term) throws IOException
      Description copied from interface: SpanCollector
      Collect information from postings
      Specified by:
      collectLeaf in interface SpanCollector
      Parameters:
      postings - a PostingsEnum
      position - the position of the PostingsEnum
      term - the Term for this postings list
      Throws:
      IOException - on error
    • reset

      public void reset()
      Description copied from interface: SpanCollector
      Call to indicate that the driving Spans has moved to a new position
      Specified by:
      reset in interface SpanCollector
    • getPayloads

      public Collection<byte[]> getPayloads()
      Returns:
      the collected payloads