public abstract class FilteredDocIdSet extends DocIdSet
match(int)
method is invoked on-demand, per docID visited during
searching. If you know few docIDs will be visited, and
the logic behind match(int)
is relatively costly,
this may be a better way to filter than ChainedFilter.DocIdSet
EMPTY_DOCIDSET
Constructor and Description |
---|
FilteredDocIdSet(DocIdSet innerSet)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
boolean |
isCacheable()
This DocIdSet implementation is cacheable if the inner set is cacheable.
|
DocIdSetIterator |
iterator()
Implementation of the contract to build a DocIdSetIterator.
|
protected abstract boolean |
match(int docid)
Validation method to determine whether a docid should be in the result set.
|
public FilteredDocIdSet(DocIdSet innerSet)
innerSet
- Underlying DocIdSetpublic boolean isCacheable()
isCacheable
in class DocIdSet
protected abstract boolean match(int docid) throws IOException
docid
- docid to be testedIOException
public DocIdSetIterator iterator() throws IOException
iterator
in class DocIdSet
IOException
DocIdSetIterator
,
FilteredDocIdSetIterator