|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.lucene.facet.search.PayloadIterator
public class PayloadIterator
A utility class for iterating through a posting list of a given term and retrieving the payload of the first occurrence in every document. Comes with its own working space (buffer).
Field Summary | |
---|---|
protected byte[] |
buffer
|
protected int |
payloadLength
|
Constructor Summary | |
---|---|
PayloadIterator(IndexReader indexReader,
Term term)
|
|
PayloadIterator(IndexReader indexReader,
Term term,
byte[] buffer)
|
Method Summary | |
---|---|
byte[] |
getBuffer()
Get the buffer with the content of the last read payload. |
int |
getPayloadLength()
Get the length of the last read payload. |
boolean |
init()
(re)initialize the iterator. |
boolean |
setdoc(int docId)
Skip forward to document docId. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected byte[] buffer
protected int payloadLength
Constructor Detail |
---|
public PayloadIterator(IndexReader indexReader, Term term) throws IOException
IOException
public PayloadIterator(IndexReader indexReader, Term term, byte[] buffer) throws IOException
IOException
Method Detail |
---|
public boolean init() throws IOException
setdoc(int)
. Returns false if there is no category list found
(no setdoc() will never return true).
IOException
public boolean setdoc(int docId) throws IOException
Users should call this method with increasing docIds, and implementations can assume that this is the case.
IOException
public byte[] getBuffer()
public int getPayloadLength()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |