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.DocIdSetEMPTY_DOCIDSET| Constructor | Description |
|---|---|
FilteredDocIdSet(DocIdSet innerSet) |
Constructor.
|
| Modifier and Type | Method | 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 DocIdSetprotected abstract boolean match(int docid)
throws IOException
docid - docid to be testedIOExceptionpublic DocIdSetIterator iterator() throws IOException
iterator in class DocIdSetIOExceptionDocIdSetIterator,
FilteredDocIdSetIteratorCopyright © 2000-2018 Apache Software Foundation. All Rights Reserved.