public class DocIdSets extends Object
| Constructor and Description |
|---|
DocIdSets() |
| Modifier and Type | Method and Description |
|---|---|
static boolean |
isEmpty(org.apache.lucene.search.DocIdSet set)
Is it an empty
DocIdSet? |
static boolean |
isFastIterator(org.apache.lucene.search.DocIdSet set)
Is
DocIdSetIterator implemented in a "fast" manner. |
static long |
sizeInBytes(org.apache.lucene.search.DocIdSet docIdSet)
Return the size of the doc id set, plus a reference to it.
|
static org.apache.lucene.search.DocIdSet |
toCacheable(org.apache.lucene.index.AtomicReader reader,
org.apache.lucene.search.DocIdSet set)
Converts to a cacheable
DocIdSet
Note, we don't use DocIdSet.isCacheable() because execution
might be expensive even if its cacheable (i.e. |
static org.apache.lucene.util.FixedBitSet |
toFixedBitSet(org.apache.lucene.search.DocIdSetIterator iterator,
int numBits)
Creates a
FixedBitSet from an iterator. |
static org.apache.lucene.util.Bits |
toSafeBits(org.apache.lucene.index.AtomicReader reader,
org.apache.lucene.search.DocIdSet set)
Gets a set to bits.
|
public static long sizeInBytes(org.apache.lucene.search.DocIdSet docIdSet)
public static boolean isEmpty(@Nullable org.apache.lucene.search.DocIdSet set)
DocIdSet?public static boolean isFastIterator(org.apache.lucene.search.DocIdSet set)
DocIdSetIterator implemented in a "fast" manner.
For example, it does not ends up iterating one doc at a time check for its "value".public static org.apache.lucene.search.DocIdSet toCacheable(org.apache.lucene.index.AtomicReader reader,
@Nullable
org.apache.lucene.search.DocIdSet set)
throws IOException
DocIdSet
Note, we don't use DocIdSet.isCacheable() because execution
might be expensive even if its cacheable (i.e. not going back to the reader to execute). We effectively
always either return an empty DocIdSet or FixedBitSet but never null.IOExceptionpublic static org.apache.lucene.util.Bits toSafeBits(org.apache.lucene.index.AtomicReader reader,
@Nullable
org.apache.lucene.search.DocIdSet set)
throws IOException
IOExceptionpublic static org.apache.lucene.util.FixedBitSet toFixedBitSet(org.apache.lucene.search.DocIdSetIterator iterator,
int numBits)
throws IOException
FixedBitSet from an iterator.IOExceptionCopyright © 2009–2016. All rights reserved.