| org.apache.solr.search.BitDocSet
BitDocSet | public class BitDocSet extends DocSetBase (Code) | | BitDocSet represents an unordered set of Lucene Document Ids
using a BitSet. A set bit represents inclusion in the set for that document.
author: yonik version: $Id: BitDocSet.java 498246 2007-01-21 05:46:31Z yonik $ since: solr 0.9 |
BitDocSet | public BitDocSet()(Code) | | |
BitDocSet | public BitDocSet(OpenBitSet bits)(Code) | | Construct a BitDocSet.
The capacity of the OpenBitSet should be at least maxDoc()
|
BitDocSet | public BitDocSet(OpenBitSet bits, int size)(Code) | | Construct a BitDocSet, and provides the number of set bits.
The capacity of the OpenBitSet should be at least maxDoc()
|
add | public void add(int doc)(Code) | | |
addUnique | public void addUnique(int doc)(Code) | | |
exists | public boolean exists(int doc)(Code) | | |
getBits | public OpenBitSet getBits()(Code) | | the internal OpenBitSet that should not be modified. |
intersectionSize | public int intersectionSize(DocSet other)(Code) | | |
invalidateSize | public void invalidateSize()(Code) | | The number of set bits - size - is cached. If the bitset is changed externally,
this method should be used to invalidate the previously cached size.
|
iterator | public DocIterator iterator()(Code) | | DocIterator using nextSetBit()
public DocIterator iterator() {
return new DocIterator() {
int pos=bits.nextSetBit(0);
public boolean hasNext() {
return pos>=0;
}
public Integer next() {
return nextDoc();
}
public void remove() {
bits.clear(pos);
}
public int nextDoc() {
int old=pos;
pos=bits.nextSetBit(old+1);
return old;
}
public float score() {
return 0.0f;
}
};
}
|
memSize | public long memSize()(Code) | | |
|
|