Package org.apache.lucene.search
Class DisjunctionScorer.TwoPhase
- java.lang.Object
-
- org.apache.lucene.search.TwoPhaseIterator
-
- org.apache.lucene.search.DisjunctionScorer.TwoPhase
-
- Enclosing class:
- DisjunctionScorer
private class DisjunctionScorer.TwoPhase extends TwoPhaseIterator
-
-
Field Summary
Fields Modifier and Type Field Description private floatmatchCost(package private) PriorityQueue<DisiWrapper>unverifiedMatches(package private) DisiWrapperverifiedMatches-
Fields inherited from class org.apache.lucene.search.TwoPhaseIterator
approximation
-
-
Constructor Summary
Constructors Modifier Constructor Description privateTwoPhase(DocIdSetIterator approximation, float matchCost)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description (package private) DisiWrappergetSubMatches()floatmatchCost()An estimate of the expected cost to determine that a single documentTwoPhaseIterator.matches().booleanmatches()Return whether the current doc ID thatTwoPhaseIterator.approximation()is on matches.-
Methods inherited from class org.apache.lucene.search.TwoPhaseIterator
approximation, asDocIdSetIterator, unwrap
-
-
-
-
Field Detail
-
matchCost
private final float matchCost
-
verifiedMatches
DisiWrapper verifiedMatches
-
unverifiedMatches
final PriorityQueue<DisiWrapper> unverifiedMatches
-
-
Constructor Detail
-
TwoPhase
private TwoPhase(DocIdSetIterator approximation, float matchCost)
-
-
Method Detail
-
getSubMatches
DisiWrapper getSubMatches() throws java.io.IOException
- Throws:
java.io.IOException
-
matches
public boolean matches() throws java.io.IOExceptionDescription copied from class:TwoPhaseIteratorReturn whether the current doc ID thatTwoPhaseIterator.approximation()is on matches. This method should only be called when the iterator is positioned -- ie. not whenDocIdSetIterator.docID()is-1orDocIdSetIterator.NO_MORE_DOCS-- and at most once.- Specified by:
matchesin classTwoPhaseIterator- Throws:
java.io.IOException
-
matchCost
public float matchCost()
Description copied from class:TwoPhaseIteratorAn estimate of the expected cost to determine that a single documentTwoPhaseIterator.matches(). This can be called before iterating the documents ofTwoPhaseIterator.approximation(). Returns an expected cost in number of simple operations like addition, multiplication, comparing two numbers and indexing an array. The returned value must be positive.- Specified by:
matchCostin classTwoPhaseIterator
-
-