public class EliasFanoDocIdSet extends DocIdSet
Constructor and Description |
---|
EliasFanoDocIdSet(int numValues,
int upperBound)
Construct an EliasFanoDocIdSet.
|
Modifier and Type | Method and Description |
---|---|
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. |
long |
ramBytesUsed()
Return the memory usage of this object in bytes.
|
static boolean |
sufficientlySmallerThanBitSet(long numValues,
long upperBound)
Provide an indication that is better to use an
EliasFanoDocIdSet than a FixedBitSet
to encode document identifiers. |
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.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.public boolean isCacheable()
isCacheable
in class DocIdSet
true
public long ramBytesUsed()
Accountable
ramBytesUsed
in interface Accountable
ramBytesUsed
in class DocIdSet
Copyright © 2000-2014 Apache Software Foundation. All Rights Reserved.