public class SortedVIntList extends DocIdSet
IndexInput and
IndexOutput.
NOTE: this class assumes the stored integers are doc Ids (hence why it
extends DocIdSet). Therefore its iterator() assumes DocIdSetIterator.NO_MORE_DOCS can be used as sentinel. If you intent to use
this value, then make sure it's not used during search
flow.
EMPTY_DOCIDSET| Constructor and Description |
|---|
SortedVIntList(BitSet bits)
Create a SortedVIntList from a BitSet.
|
SortedVIntList(DocIdSetIterator docIdSetIterator)
Create a SortedVIntList.
|
SortedVIntList(int... sortedInts)
Create a SortedVIntList from all elements of an array of integers.
|
SortedVIntList(int[] sortedInts,
int inputSize)
Create a SortedVIntList from an array of integers.
|
| Modifier and Type | Method and Description |
|---|---|
int |
getByteSize() |
boolean |
isCacheable()
This DocIdSet implementation is cacheable.
|
DocIdSetIterator |
iterator()
Provides a
DocIdSetIterator to access the set. |
int |
size() |
public SortedVIntList(int... sortedInts)
sortedInts - A sorted array of non negative integers.public SortedVIntList(int[] sortedInts,
int inputSize)
sortedInts - An array of sorted non negative integers.inputSize - The number of integers to be used from the array.public SortedVIntList(BitSet bits)
bits - A bit set representing a set of integers.public SortedVIntList(DocIdSetIterator docIdSetIterator) throws IOException
docIdSetIterator - An iterator providing document numbers as a set of integers.
This DocIdSetIterator is iterated completely when this constructor
is called and it must provide the integers in non
decreasing order.IOExceptionpublic int size()
public int getByteSize()
public boolean isCacheable()
isCacheable in class DocIdSetpublic DocIdSetIterator iterator()
DocIdSetDocIdSetIterator to access the set.
This implementation can return null or
DocIdSet.EMPTY_DOCIDSET.iterator() if there
are no docs that match.