Class PayloadNearQuery.PayloadNearSpanScorer
- java.lang.Object
-
- org.apache.lucene.search.DocIdSetIterator
-
- org.apache.lucene.search.Scorer
-
- org.apache.lucene.search.spans.SpanScorer
-
- org.apache.lucene.search.payloads.PayloadNearQuery.PayloadNearSpanScorer
-
- Enclosing class:
- PayloadNearQuery
public class PayloadNearQuery.PayloadNearSpanScorer extends SpanScorer
-
-
Field Summary
Fields Modifier and Type Field Description protected float
payloadScore
-
Fields inherited from class org.apache.lucene.search.DocIdSetIterator
NO_MORE_DOCS
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
PayloadNearSpanScorer(Spans spans, Weight weight, Similarity similarity, byte[] norms)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected Explanation
explain(int doc)
This method is no longer an official member ofScorer
, but it is needed by SpanWeight to build an explanation.void
getPayloads(Spans[] subSpans)
protected void
processPayloads(Collection<byte[]> payLoads, int start, int end)
By default, uses thePayloadFunction
to score the payloads, but can be overridden to do other things.float
score()
Returns the score of the current document matching the query.protected boolean
setFreqCurrentDoc()
-
Methods inherited from class org.apache.lucene.search.spans.SpanScorer
advance, docID, freq, nextDoc
-
Methods inherited from class org.apache.lucene.search.Scorer
getSimilarity, score, score, visitScorers, visitSubScorers
-
-
-
-
Constructor Detail
-
PayloadNearSpanScorer
protected PayloadNearSpanScorer(Spans spans, Weight weight, Similarity similarity, byte[] norms) throws IOException
- Throws:
IOException
-
-
Method Detail
-
getPayloads
public void getPayloads(Spans[] subSpans) throws IOException
- Throws:
IOException
-
processPayloads
protected void processPayloads(Collection<byte[]> payLoads, int start, int end)
By default, uses thePayloadFunction
to score the payloads, but can be overridden to do other things.- Parameters:
payLoads
- The payloadsstart
- The start position of the span being scoredend
- The end position of the span being scored- See Also:
Spans
-
setFreqCurrentDoc
protected boolean setFreqCurrentDoc() throws IOException
- Overrides:
setFreqCurrentDoc
in classSpanScorer
- Throws:
IOException
-
score
public float score() throws IOException
Description copied from class:Scorer
Returns the score of the current document matching the query. Initially invalid, untilDocIdSetIterator.nextDoc()
orDocIdSetIterator.advance(int)
is called the first time, or when called from withinCollector.collect(int)
.- Overrides:
score
in classSpanScorer
- Throws:
IOException
-
explain
protected Explanation explain(int doc) throws IOException
Description copied from class:SpanScorer
This method is no longer an official member ofScorer
, but it is needed by SpanWeight to build an explanation.- Overrides:
explain
in classSpanScorer
- Throws:
IOException
-
-