Class EnhancementsPayloadIterator
- java.lang.Object
-
- org.apache.lucene.facet.search.PayloadIterator
-
- org.apache.lucene.facet.enhancements.EnhancementsPayloadIterator
-
public class EnhancementsPayloadIterator extends PayloadIterator
APayloadIterator
for iterating over category posting lists generated usingEnhancementsCategoryTokenizer
.- WARNING: This API is experimental and might change in incompatible ways in the next release.
-
-
Field Summary
-
Fields inherited from class org.apache.lucene.facet.search.PayloadIterator
buffer, payloadLength
-
-
Constructor Summary
Constructors Constructor Description EnhancementsPayloadIterator(List<CategoryEnhancement> enhancementsList, IndexReader indexReader, Term term)
Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Object
getCategoryData(CategoryEnhancement enhancedCategory)
Get the data of the current category and document for a certain enhancement, ornull
if no such enhancement exists.boolean
setdoc(int docId)
Skip forward to document docId.-
Methods inherited from class org.apache.lucene.facet.search.PayloadIterator
getBuffer, getPayloadLength, init
-
-
-
-
Constructor Detail
-
EnhancementsPayloadIterator
public EnhancementsPayloadIterator(List<CategoryEnhancement> enhancementsList, IndexReader indexReader, Term term) throws IOException
Constructor.- Parameters:
enhancementsList
- A list of theCategoryEnhancement
s from the indexing params.indexReader
- A reader of the index.term
- The category term to iterate.- Throws:
IOException
-
-
Method Detail
-
setdoc
public boolean setdoc(int docId) throws IOException
Description copied from class:PayloadIterator
Skip forward to document docId. Return true if this document exists and has any payload.Users should call this method with increasing docIds, and implementations can assume that this is the case.
- Overrides:
setdoc
in classPayloadIterator
- Throws:
IOException
-
getCategoryData
public Object getCategoryData(CategoryEnhancement enhancedCategory)
Get the data of the current category and document for a certain enhancement, ornull
if no such enhancement exists.- Parameters:
enhancedCategory
- The category enhancement to apply.- Returns:
- the data of the current category and document for a certain
enhancement, or
null
if no such enhancement exists.
-
-