abstract class PhraseMatcher
extends java.lang.Object
approximation
to the
relevant document, then call reset()
. Clients can then call
nextMatch()
to iterate over the matchesModifier and Type | Field and Description |
---|---|
protected DocIdSetIterator |
approximation |
private float |
matchCost |
Constructor and Description |
---|
PhraseMatcher(DocIdSetIterator approximation,
float matchCost) |
Modifier and Type | Method and Description |
---|---|
(package private) abstract int |
endOffset()
The end offset of the current match
|
(package private) abstract int |
endPosition()
The end position of the current match
|
float |
getMatchCost()
An estimate of the average cost of finding all matches on a document
|
(package private) abstract float |
maxFreq()
An upper bound on the number of possible matches on this document
|
abstract boolean |
nextMatch()
Find the next match on the current document, returning
false if there
are none. |
abstract void |
reset()
Called after
approximation has been advanced |
(package private) abstract float |
sloppyWeight()
The slop-adjusted weight of the current match
The sum of the slop-adjusted weights is used as the freq for scoring
|
(package private) abstract int |
startOffset()
The start offset of the current match
|
(package private) abstract int |
startPosition()
The start position of the current match
|
protected final DocIdSetIterator approximation
private final float matchCost
PhraseMatcher(DocIdSetIterator approximation, float matchCost)
abstract float maxFreq() throws java.io.IOException
java.io.IOException
public abstract void reset() throws java.io.IOException
approximation
has been advancedjava.io.IOException
public abstract boolean nextMatch() throws java.io.IOException
false
if there
are none.java.io.IOException
abstract float sloppyWeight()
abstract int startPosition()
abstract int endPosition()
abstract int startOffset() throws java.io.IOException
java.io.IOException
abstract int endOffset() throws java.io.IOException
java.io.IOException
public float getMatchCost()
TwoPhaseIterator.matchCost()