Package org.apache.lucene.search
Class XFilteredDocIdSetIterator
- java.lang.Object
-
- org.apache.lucene.search.DocIdSetIterator
-
- org.apache.lucene.search.XFilteredDocIdSetIterator
-
public abstract class XFilteredDocIdSetIterator extends org.apache.lucene.search.DocIdSetIterator
Abstract decorator class of a DocIdSetIterator implementation that provides on-demand filter/validation mechanism on an underlying DocIdSetIterator.
-
-
Field Summary
Fields Modifier and Type Field Description protected org.apache.lucene.search.DocIdSetIterator
_innerIter
-
Constructor Summary
Constructors Constructor Description XFilteredDocIdSetIterator(org.apache.lucene.search.DocIdSetIterator innerIter)
Constructor.
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description int
advance(int target)
long
cost()
int
docID()
org.apache.lucene.search.DocIdSetIterator
getDelegate()
Return the wrappedDocIdSetIterator
.protected abstract boolean
match(int doc)
Validation method to determine whether a docid should be in the result set.int
nextDoc()
-
-
-
Method Detail
-
getDelegate
public org.apache.lucene.search.DocIdSetIterator getDelegate()
Return the wrappedDocIdSetIterator
.
-
match
protected abstract boolean match(int doc)
Validation method to determine whether a docid should be in the result set.- Parameters:
doc
- docid to be tested- Returns:
- true if input docid should be in the result set, false otherwise.
- Throws:
org.apache.lucene.search.CollectionTerminatedException
- if the underlying iterator is exhausted.- See Also:
XFilteredDocIdSetIterator(DocIdSetIterator)
-
docID
public int docID()
- Specified by:
docID
in classorg.apache.lucene.search.DocIdSetIterator
-
nextDoc
public int nextDoc() throws java.io.IOException
- Specified by:
nextDoc
in classorg.apache.lucene.search.DocIdSetIterator
- Throws:
java.io.IOException
-
advance
public int advance(int target) throws java.io.IOException
- Specified by:
advance
in classorg.apache.lucene.search.DocIdSetIterator
- Throws:
java.io.IOException
-
cost
public long cost()
- Specified by:
cost
in classorg.apache.lucene.search.DocIdSetIterator
-
-