org.apache.lucene.facet

## Class FacetUtils

- java.lang.Object
- - org.apache.lucene.facet.FacetUtils

    public final class FacetUtils
    extends Object

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

All Methods Static Methods Concrete Methods
`static DocIdSetIterator` `liveDocsDISI(DocIdSetIterator it, Bits liveDocs)` Wrap the given DocIdSetIterator and liveDocs into another DocIdSetIterator that returns non-deleted documents during iteration.

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Method Detail

#### liveDocsDISI

    public static DocIdSetIterator liveDocsDISI(DocIdSetIterator it,
                                                Bits liveDocs)

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.

Making this class pkg-private unfortunately limits the visibility of this method to `SortedSetDocValuesFacetCounts` and `ConcurrentSortedSetDocValuesFacetCounts` classes as Java does not allow pkg-private classes to be visible to sub-packages.

Parameters:
  `it` - `DocIdSetIterator` being wrapped
  `liveDocs` - `Bits` containing set bits for non-deleted docs
Returns:
  wrapped iterator