Class BitsFilteredDocIdSet


public final class BitsFilteredDocIdSet extends FilteredDocIdSet
This implementation supplies a filtered DocIdSet, that excludes all docids which are not in a Bits instance. This is especially useful in Filter to apply the acceptDocs passed to getDocIdSet() before returning the final DocIdSet.
See Also:
  • Constructor Details

    • BitsFilteredDocIdSet

      public BitsFilteredDocIdSet(DocIdSet innerSet, Bits acceptDocs)
      Constructor.
      Parameters:
      innerSet - Underlying DocIdSet
      acceptDocs - Allowed docs, all docids not in this set will not be returned by this DocIdSet
  • Method Details

    • wrap

      public static DocIdSet wrap(DocIdSet set, Bits acceptDocs)
      Convenience wrapper method: If acceptDocs == null it returns the original set without wrapping.
      Parameters:
      set - Underlying DocIdSet. If null, this method returns null
      acceptDocs - Allowed docs, all docids not in this set will not be returned by this DocIdSet. If null, this method returns the original set without wrapping.