Package org.apache.lucene.facet
Class FacetUtils
java.lang.Object
org.apache.lucene.facet.FacetUtils
Utility class with a single method for getting a DocIdSetIterator that skips deleted docs
- WARNING: This API is experimental and might change in incompatible ways in the next release.
-
Method Summary
Modifier and TypeMethodDescriptionstatic DocIdSetIterator
liveDocsDISI
(DocIdSetIterator it, Bits liveDocs) Wrap the given DocIdSetIterator and liveDocs into another DocIdSetIterator that returns non-deleted documents during iteration.
-
Method Details
-
liveDocsDISI
Wrap the given DocIdSetIterator and liveDocs into another DocIdSetIterator that returns non-deleted documents during iteration. This is useful for computing facet counts on match-all style queries that need to exclude deleted documents.ConjunctionUtils
could be better home for this method if we can identify use cases outside facets module.Making this class pkg-private unfortunately limits the visibility of this method to
SortedSetDocValuesFacetCounts
andConcurrentSortedSetDocValuesFacetCounts
classes as Java does not allow pkg-private classes to be visible to sub-packages.- Parameters:
it
-DocIdSetIterator
being wrappedliveDocs
-Bits
containing set bits for non-deleted docs- Returns:
- wrapped iterator
-