Package org.apache.lucene.util
Class OpenBitSetDISI
java.lang.Object
org.apache.lucene.search.DocIdSet
org.apache.lucene.util.OpenBitSet
org.apache.lucene.util.OpenBitSetDISI
OpenBitSet with added methods to bulk-update the bits
from a
DocIdSetIterator
.-
Nested Class Summary
Nested classes/interfaces inherited from interface org.apache.lucene.util.Bits
Bits.MatchAllBits, Bits.MatchNoBits
-
Field Summary
Fields inherited from class org.apache.lucene.util.OpenBitSet
bits, wlen
Fields inherited from interface org.apache.lucene.util.Bits
EMPTY_ARRAY
-
Constructor Summary
ConstructorsConstructorDescriptionOpenBitSetDISI
(int maxSize) Construct an OpenBitSetDISI with no bits set, and a given maximum size one larger than the largest doc id for which a bit may ever be set on this OpenBitSetDISI.OpenBitSetDISI
(DocIdSetIterator disi, int maxSize) Construct an OpenBitSetDISI with its bits set from the doc ids of the given DocIdSetIterator. -
Method Summary
Modifier and TypeMethodDescriptionvoid
inPlaceAnd
(DocIdSetIterator disi) Perform an inplace AND with the doc ids from a given DocIdSetIterator, leaving only the bits set for which the doc ids are in common.void
inPlaceNot
(DocIdSetIterator disi) Perform an inplace NOT with the doc ids from a given DocIdSetIterator, clearing all the bits for each such doc id.void
inPlaceOr
(DocIdSetIterator disi) Perform an inplace OR with the doc ids from a given DocIdSetIterator, setting the bit for each such doc id.void
inPlaceXor
(DocIdSetIterator disi) Perform an inplace XOR with the doc ids from a given DocIdSetIterator, flipping all the bits for each such doc id.Methods inherited from class org.apache.lucene.util.OpenBitSet
and, andNot, andNotCount, bits, bits2words, capacity, cardinality, clear, clear, clear, clone, ensureCapacity, ensureCapacityWords, equals, expandingWordNum, fastClear, fastClear, fastFlip, fastFlip, fastGet, fastGet, fastSet, fastSet, flip, flip, flipAndGet, flipAndGet, get, get, getAndSet, getAndSet, getBit, getBits, getNumWords, hashCode, intersect, intersectionCount, intersects, isCacheable, isEmpty, iterator, length, nextSetBit, nextSetBit, or, prevSetBit, prevSetBit, remove, set, set, size, trimTrailingZeros, union, unionCount, xor, xorCount
-
Constructor Details
-
OpenBitSetDISI
Construct an OpenBitSetDISI with its bits set from the doc ids of the given DocIdSetIterator. Also give a maximum size one larger than the largest doc id for which a bit may ever be set on this OpenBitSetDISI.- Throws:
IOException
-
OpenBitSetDISI
public OpenBitSetDISI(int maxSize) Construct an OpenBitSetDISI with no bits set, and a given maximum size one larger than the largest doc id for which a bit may ever be set on this OpenBitSetDISI.
-
-
Method Details
-
inPlaceOr
Perform an inplace OR with the doc ids from a given DocIdSetIterator, setting the bit for each such doc id. These doc ids should be smaller than the maximum size passed to the constructor.- Throws:
IOException
-
inPlaceAnd
Perform an inplace AND with the doc ids from a given DocIdSetIterator, leaving only the bits set for which the doc ids are in common. These doc ids should be smaller than the maximum size passed to the constructor.- Throws:
IOException
-
inPlaceNot
Perform an inplace NOT with the doc ids from a given DocIdSetIterator, clearing all the bits for each such doc id. These doc ids should be smaller than the maximum size passed to the constructor.- Throws:
IOException
-
inPlaceXor
Perform an inplace XOR with the doc ids from a given DocIdSetIterator, flipping all the bits for each such doc id. These doc ids should be smaller than the maximum size passed to the constructor.- Throws:
IOException
-