Package org.apache.lucene.queries.spans
Class SpanScorer
java.lang.Object
org.apache.lucene.search.Scorable
org.apache.lucene.search.Scorer
org.apache.lucene.queries.spans.SpanScorer
- WARNING: This API is experimental and might change in incompatible ways in the next release.
-
Nested Class Summary
Nested classes/interfaces inherited from class org.apache.lucene.search.Scorable
Scorable.ChildScorable
-
Field Summary
-
Constructor Summary
ConstructorDescriptionSpanScorer
(SpanWeight weight, Spans spans, LeafSimScorer docScorer) Sole constructor. -
Method Summary
Modifier and TypeMethodDescriptionint
docID()
float
getMaxScore
(int upTo) getSpans()
return the Spans for this Scorer *iterator()
final float
score()
protected float
Score the current doc.protected final void
Setsfreq
for the current document.Methods inherited from class org.apache.lucene.search.Scorer
advanceShallow, getWeight
Methods inherited from class org.apache.lucene.search.Scorable
getChildren, setMinCompetitiveScore, smoothingScore
-
Field Details
-
spans
-
docScorer
-
-
Constructor Details
-
SpanScorer
Sole constructor.
-
-
Method Details
-
getSpans
return the Spans for this Scorer * -
docID
public int docID() -
iterator
-
twoPhaseIterator
- Overrides:
twoPhaseIterator
in classScorer
-
scoreCurrentDoc
Score the current doc. The default implementation scores the doc with the similarity using the slop-adjustedfreq
.- Throws:
IOException
-
setFreqCurrentDoc
Setsfreq
for the current document.This will be called at most once per document.
- Throws:
IOException
-
score
- Specified by:
score
in classScorable
- Throws:
IOException
-
getMaxScore
- Specified by:
getMaxScore
in classScorer
- Throws:
IOException
-