public abstract class FieldCacheDocIdSet extends DocIdSet
matchDoc(int)
method is not optimized, as iterators simply increment
the document id until matchDoc(int)
returns true. Because of this
matchDoc(int)
must be as fast as possible and in no case do any
I/O.Modifier and Type | Field and Description |
---|---|
protected IndexReader |
reader |
EMPTY_DOCIDSET
Constructor and Description |
---|
FieldCacheDocIdSet(IndexReader reader) |
Modifier and Type | Method and Description |
---|---|
boolean |
isCacheable()
this DocIdSet is cacheable, if it works solely with FieldCache and no TermDocs
|
DocIdSetIterator |
iterator()
Provides a
DocIdSetIterator to access the set. |
protected abstract boolean |
matchDoc(int doc)
this method checks, if a doc is a hit
|
protected final IndexReader reader
public FieldCacheDocIdSet(IndexReader reader)
protected abstract boolean matchDoc(int doc)
public final boolean isCacheable()
isCacheable
in class DocIdSet
public final DocIdSetIterator iterator() throws IOException
DocIdSet
DocIdSetIterator
to access the set.
This implementation can return null
or
DocIdSet.EMPTY_DOCIDSET.iterator()
if there
are no docs that match.iterator
in class DocIdSet
IOException