final class ExactPhraseMatcher extends PhraseMatcher
| Modifier and Type | Class and Description |
|---|---|
private static class |
ExactPhraseMatcher.PostingsAndPosition |
| Modifier and Type | Field and Description |
|---|---|
private ExactPhraseMatcher.PostingsAndPosition[] |
postings |
approximation| Constructor and Description |
|---|
ExactPhraseMatcher(PhraseQuery.PostingsAndFreq[] postings,
float matchCost) |
| Modifier and Type | Method and Description |
|---|---|
private static boolean |
advancePosition(ExactPhraseMatcher.PostingsAndPosition posting,
int target)
Advance the given pos enum to the first doc on or after
target. |
private static DocIdSetIterator |
approximation(PhraseQuery.PostingsAndFreq[] postings) |
int |
endOffset()
The end offset of the current match
|
int |
endPosition()
The end position of the current match
|
(package private) float |
maxFreq()
An upper bound on the number of possible matches on this document
|
boolean |
nextMatch()
Find the next match on the current document, returning
false if there
are none. |
void |
reset()
Called after
PhraseMatcher.approximation has been advanced |
(package private) float |
sloppyWeight()
The slop-adjusted weight of the current match
The sum of the slop-adjusted weights is used as the freq for scoring
|
int |
startOffset()
The start offset of the current match
|
int |
startPosition()
The start position of the current match
|
getMatchCostprivate final ExactPhraseMatcher.PostingsAndPosition[] postings
ExactPhraseMatcher(PhraseQuery.PostingsAndFreq[] postings, float matchCost)
private static DocIdSetIterator approximation(PhraseQuery.PostingsAndFreq[] postings)
float maxFreq()
PhraseMatchermaxFreq in class PhraseMatcherprivate static boolean advancePosition(ExactPhraseMatcher.PostingsAndPosition posting, int target) throws java.io.IOException
target.
Return false if the enum was exhausted before reaching
target and true otherwise.java.io.IOExceptionpublic void reset()
throws java.io.IOException
PhraseMatcherPhraseMatcher.approximation has been advancedreset in class PhraseMatcherjava.io.IOExceptionpublic boolean nextMatch()
throws java.io.IOException
PhraseMatcherfalse if there
are none.nextMatch in class PhraseMatcherjava.io.IOExceptionfloat sloppyWeight()
PhraseMatchersloppyWeight in class PhraseMatcherpublic int startPosition()
PhraseMatcherstartPosition in class PhraseMatcherpublic int endPosition()
PhraseMatcherendPosition in class PhraseMatcherpublic int startOffset()
throws java.io.IOException
PhraseMatcherstartOffset in class PhraseMatcherjava.io.IOExceptionpublic int endOffset()
throws java.io.IOException
PhraseMatcherendOffset in class PhraseMatcherjava.io.IOException