public abstract class TwoPhaseDocIdSetIterator extends Object
DocIdSetIterator
. When the approximation()
's
DocIdSetIterator.nextDoc()
or DocIdSetIterator.advance(int)
return, matches()
needs to be checked in order to know whether the
returned doc ID actually matches.Constructor and Description |
---|
TwoPhaseDocIdSetIterator() |
Modifier and Type | Method and Description |
---|---|
abstract DocIdSetIterator |
approximation()
Return an approximation.
|
static DocIdSetIterator |
asDocIdSetIterator(TwoPhaseDocIdSetIterator twoPhaseIterator)
Return a
DocIdSetIterator view of the provided
TwoPhaseDocIdSetIterator . |
abstract boolean |
matches()
Return whether the current doc ID that the iterator is on matches.
|
public static DocIdSetIterator asDocIdSetIterator(TwoPhaseDocIdSetIterator twoPhaseIterator)
DocIdSetIterator
view of the provided
TwoPhaseDocIdSetIterator
.public abstract DocIdSetIterator approximation()
DocIdSetIterator
is a
superset of the matching documents, and each match needs to be confirmed
with matches()
in order to know whether it matches or not.public abstract boolean matches() throws IOException
DocIdSetIterator.docID()
is -1
or
DocIdSetIterator.NO_MORE_DOCS
-- and at most once.IOException
Copyright © 2000-2016 Apache Software Foundation. All Rights Reserved.