Package org.apache.lucene.payloads
Class PayloadSpanCollector
- java.lang.Object
-
- org.apache.lucene.payloads.PayloadSpanCollector
-
- All Implemented Interfaces:
SpanCollector
public class PayloadSpanCollector extends java.lang.Object implements SpanCollector
SpanCollector for collecting payloads
-
-
Field Summary
Fields Modifier and Type Field Description private java.util.Collection<byte[]>
payloads
-
Constructor Summary
Constructors Constructor Description PayloadSpanCollector()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
collectLeaf(PostingsEnum postings, int position, Term term)
Collect information from postingsjava.util.Collection<byte[]>
getPayloads()
void
reset()
Call to indicate that the driving Spans has moved to a new position
-
-
-
Method Detail
-
collectLeaf
public void collectLeaf(PostingsEnum postings, int position, Term term) throws java.io.IOException
Description copied from interface:SpanCollector
Collect information from postings- Specified by:
collectLeaf
in interfaceSpanCollector
- Parameters:
postings
- aPostingsEnum
position
- the position of the PostingsEnumterm
- theTerm
for this postings list- Throws:
java.io.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 interfaceSpanCollector
-
getPayloads
public java.util.Collection<byte[]> getPayloads()
- Returns:
- the collected payloads
-
-