|Constructor and Description|
|Modifier and Type||Method and Description|
Optionally provides a
This method is a hint for
public abstract DocIdSetIterator iterator() throws IOException
DocIdSetIteratorto access the set. This implementation can return
nullif there are no docs that match.
public Bits bits() throws IOException
Bitsinterface for random access to matching documents.
null, if this
DocIdSetdoes not support random access. In contrast to
iterator(), a return value of
nulldoes not imply that no documents match the filter! The default implementation does not provide random access, so you only need to implement this method if your DocIdSet can guarantee random access to every docid in O(1) time without external disk access (as
Bitsinterface cannot throw
IOException). This is generally true for bit sets like
FixedBitSet, which return itself if they are used as
public boolean isCacheable()
CachingWrapperFilter, if this
DocIdSetshould be cached without copying it into a BitSet. The default is to return
false. If you have an own
DocIdSetimplementation that does its iteration very effective and fast without doing disk I/O, override this method and return
Copyright © 2000-2013 Apache Software Foundation. All Rights Reserved.