public class EnhancementsPayloadIterator extends PayloadIterator
PayloadIterator
for iterating over category posting lists generated
using EnhancementsCategoryTokenizer
.buffer, payloadLength
Constructor and Description |
---|
EnhancementsPayloadIterator(List<CategoryEnhancement> enhancementsList,
IndexReader indexReader,
Term term)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
Object |
getCategoryData(CategoryEnhancement enhancedCategory)
Get the data of the current category and document for a certain
enhancement, or
null if no such enhancement exists. |
boolean |
setdoc(int docId)
Skip forward to document docId.
|
getBuffer, getPayloadLength, init
public EnhancementsPayloadIterator(List<CategoryEnhancement> enhancementsList, IndexReader indexReader, Term term) throws IOException
enhancementsList
- A list of the CategoryEnhancement
s from the indexing
params.indexReader
- A reader of the index.term
- The category term to iterate.IOException
public boolean setdoc(int docId) throws IOException
PayloadIterator
Users should call this method with increasing docIds, and implementations can assume that this is the case.
setdoc
in class PayloadIterator
IOException
public Object getCategoryData(CategoryEnhancement enhancedCategory)
null
if no such enhancement exists.enhancedCategory
- The category enhancement to apply.null
if no such enhancement exists.