Class EnhancementsPayloadIterator
- java.lang.Object
-
- org.apache.lucene.facet.search.PayloadIterator
-
- org.apache.lucene.facet.enhancements.EnhancementsPayloadIterator
-
public class EnhancementsPayloadIterator extends PayloadIterator
APayloadIteratorfor 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 ObjectgetCategoryData(CategoryEnhancement enhancedCategory)Get the data of the current category and document for a certain enhancement, ornullif no such enhancement exists.booleansetdoc(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 theCategoryEnhancements 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 IOExceptionDescription copied from class:PayloadIteratorSkip 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:
setdocin classPayloadIterator- Throws:
IOException
-
getCategoryData
public Object getCategoryData(CategoryEnhancement enhancedCategory)
Get the data of the current category and document for a certain enhancement, ornullif 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
nullif no such enhancement exists.
-
-