public class PayloadIterator extends Object
getPayload(int)
are deleted, since it is usually used to iterate on
payloads of documents that matched a query. If you need to skip over deleted
documents, you should do so before calling getPayload(int)
.Constructor and Description |
---|
PayloadIterator(Term term) |
Modifier and Type | Method and Description |
---|---|
BytesRef |
getPayload(int docID)
Returns the
payload of the given document, or null
if the document does not exist, there are no more documents in the posting
list, or the document exists but has not payload. |
boolean |
setNextReader(AtomicReaderContext context)
Sets the
AtomicReaderContext for which getPayload(int)
calls will be made. |
public PayloadIterator(Term term) throws IOException
IOException
public boolean setNextReader(AtomicReaderContext context) throws IOException
AtomicReaderContext
for which getPayload(int)
calls will be made. Returns true iff this reader has payload for any of the
documents belonging to the Term
given to the constructor.IOException
public BytesRef getPayload(int docID) throws IOException
payload
of the given document, or null
if the document does not exist, there are no more documents in the posting
list, or the document exists but has not payload. The given document IDs
are treated as local to the reader given to
setNextReader(AtomicReaderContext)
.IOException
Copyright © 2000-2013 Apache Software Foundation. All Rights Reserved.