|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.lucene.search.DocIdSet org.apache.lucene.util.packed.EliasFanoDocIdSet
public class EliasFanoDocIdSet
A DocIdSet in Elias-Fano encoding.
Constructor Summary | |
---|---|
EliasFanoDocIdSet(int numValues,
int upperBound)
Construct an EliasFanoDocIdSet. |
Method Summary | |
---|---|
void |
encodeFromDisi(DocIdSetIterator disi)
Encode the document ids from a DocIdSetIterator. |
boolean |
equals(Object other)
|
int |
hashCode()
|
boolean |
isCacheable()
This DocIdSet implementation is cacheable. |
DocIdSetIterator |
iterator()
Provides a DocIdSetIterator to access encoded document ids. |
static boolean |
sufficientlySmallerThanBitSet(long numValues,
long upperBound)
Provide an indication that is better to use an EliasFanoDocIdSet than a FixedBitSet
to encode document identifiers. |
Methods inherited from class org.apache.lucene.search.DocIdSet |
---|
bits |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public EliasFanoDocIdSet(int numValues, int upperBound)
numValues
- At least the number of document ids that will be encoded.upperBound
- At least the highest document id that will be encoded.Method Detail |
---|
public static boolean sufficientlySmallerThanBitSet(long numValues, long upperBound)
EliasFanoDocIdSet
than a FixedBitSet
to encode document identifiers.
numValues
- The number of document identifiers that is to be encoded. Should be non negative.upperBound
- The maximum possible value for a document identifier. Should be at least numValues
.
EliasFanoEncoder.sufficientlySmallerThanBitSet(long, long)
public void encodeFromDisi(DocIdSetIterator disi) throws IOException
disi
- This DocIdSetIterator should provide document ids that are consistent
with numValues
and upperBound
as provided to the constructor.
IOException
public DocIdSetIterator iterator()
DocIdSetIterator
to access encoded document ids.
iterator
in class DocIdSet
public boolean isCacheable()
isCacheable
in class DocIdSet
true
public boolean equals(Object other)
equals
in class Object
public int hashCode()
hashCode
in class Object
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |