Package org.apache.lucene.search
Class DocIdSet
- java.lang.Object
-
- org.apache.lucene.search.DocIdSet
-
- Direct Known Subclasses:
DocIdBitSet,FieldCacheDocIdSet,FilteredDocIdSet,FixedBitSet,OpenBitSet,SortedVIntList
public abstract class DocIdSet extends Object
A DocIdSet contains a set of doc ids. Implementing classes must only implementiterator()to provide access to the set.
-
-
Field Summary
Fields Modifier and Type Field Description static DocIdSetEMPTY_DOCIDSETAn emptyDocIdSetinstance for easy use, e.g.
-
Constructor Summary
Constructors Constructor Description DocIdSet()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description booleanisCacheable()This method is a hint forCachingWrapperFilter, if thisDocIdSetshould be cached without copying it into a BitSet.abstract DocIdSetIteratoriterator()Provides aDocIdSetIteratorto access the set.
-
-
-
Field Detail
-
EMPTY_DOCIDSET
public static final DocIdSet EMPTY_DOCIDSET
An emptyDocIdSetinstance for easy use, e.g. in Filters that hit no documents.
-
-
Method Detail
-
iterator
public abstract DocIdSetIterator iterator() throws IOException
Provides aDocIdSetIteratorto access the set. This implementation can returnnullorEMPTY_DOCIDSET.iterator()if there are no docs that match.- Throws:
IOException
-
isCacheable
public boolean isCacheable()
This method is a hint forCachingWrapperFilter, if thisDocIdSetshould be cached without copying it into a BitSet. The default is to returnfalse. If you have an ownDocIdSetimplementation that does its iteration very effective and fast without doing disk I/O, override this method and returntrue.
-
-