final class ExactPhraseMatcher extends PhraseMatcher
| Modifier and Type | Class and Description |
|---|---|
private static class |
ExactPhraseMatcher.PostingsAndPosition |
| Modifier and Type | Field and Description |
|---|---|
private DocIdSetIterator |
approximation |
private ImpactsDISI |
impactsApproximation |
private ExactPhraseMatcher.PostingsAndPosition[] |
postings |
| Constructor and Description |
|---|
ExactPhraseMatcher(PhraseQuery.PostingsAndFreq[] postings,
ScoreMode scoreMode,
Similarity.SimScorer scorer,
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. |
(package private) DocIdSetIterator |
approximation()
Approximation that only matches documents that have all terms.
|
int |
endOffset()
The end offset of the current match
|
int |
endPosition()
The end position of the current match
|
(package private) ImpactsDISI |
impactsApproximation()
Approximation that is aware of impacts.
|
(package private) float |
maxFreq()
An upper bound on the number of possible matches on this document
|
(package private) static ImpactsSource |
mergeImpacts(ImpactsEnum[] impactsEnums)
Merge impacts for multiple terms of an exact phrase.
|
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
private final DocIdSetIterator approximation
private final ImpactsDISI impactsApproximation
ExactPhraseMatcher(PhraseQuery.PostingsAndFreq[] postings, ScoreMode scoreMode, Similarity.SimScorer scorer, float matchCost)
DocIdSetIterator approximation()
PhraseMatcherapproximation in class PhraseMatcherImpactsDISI impactsApproximation()
PhraseMatcherimpactsApproximation in class PhraseMatcherfloat 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.IOExceptionstatic ImpactsSource mergeImpacts(ImpactsEnum[] impactsEnums)