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
-
public class SpanScorer extends Scorer
- 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
-
-
Constructor Summary
Constructors Constructor Description SpanScorer(SpanWeight weight, Spans spans, LeafSimScorer docScorer)
Sole constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
docID()
float
getMaxScore(int upTo)
Spans
getSpans()
return the Spans for this Scorer *DocIdSetIterator
iterator()
float
score()
protected float
scoreCurrentDoc()
Score the current doc.protected void
setFreqCurrentDoc()
Setsfreq
for the current document.TwoPhaseIterator
twoPhaseIterator()
-
Methods inherited from class org.apache.lucene.search.Scorer
advanceShallow, getWeight
-
Methods inherited from class org.apache.lucene.search.Scorable
getChildren, setMinCompetitiveScore, smoothingScore
-
-
-
-
Field Detail
-
spans
protected final Spans spans
-
docScorer
protected final LeafSimScorer docScorer
-
-
Constructor Detail
-
SpanScorer
public SpanScorer(SpanWeight weight, Spans spans, LeafSimScorer docScorer)
Sole constructor.
-
-
Method Detail
-
getSpans
public Spans getSpans()
return the Spans for this Scorer *
-
iterator
public DocIdSetIterator iterator()
-
twoPhaseIterator
public TwoPhaseIterator twoPhaseIterator()
- Overrides:
twoPhaseIterator
in classScorer
-
scoreCurrentDoc
protected float scoreCurrentDoc() throws IOException
Score the current doc. The default implementation scores the doc with the similarity using the slop-adjustedfreq
.- Throws:
IOException
-
setFreqCurrentDoc
protected final void setFreqCurrentDoc() throws IOException
Setsfreq
for the current document.This will be called at most once per document.
- Throws:
IOException
-
score
public final float score() throws IOException
- Specified by:
score
in classScorable
- Throws:
IOException
-
getMaxScore
public float getMaxScore(int upTo) throws IOException
- Specified by:
getMaxScore
in classScorer
- Throws:
IOException
-
-