Class PayloadTermQuery.PayloadTermWeight.PayloadTermSpanScorer
java.lang.Object
org.apache.lucene.search.DocIdSetIterator
org.apache.lucene.index.DocsEnum
org.apache.lucene.search.Scorer
org.apache.lucene.search.spans.SpanScorer
org.apache.lucene.search.payloads.PayloadTermQuery.PayloadTermWeight.PayloadTermSpanScorer
- Enclosing class:
- PayloadTermQuery.PayloadTermWeight
-
Nested Class Summary
Nested classes/interfaces inherited from class org.apache.lucene.search.Scorer
Scorer.ChildScorer -
Field Summary
FieldsFields inherited from class org.apache.lucene.search.spans.SpanScorer
doc, docScorer, freq, more, numMatches, spansFields inherited from class org.apache.lucene.index.DocsEnum
FLAG_FREQS, FLAG_NONEFields inherited from class org.apache.lucene.search.DocIdSetIterator
NO_MORE_DOCS -
Constructor Summary
ConstructorsConstructorDescriptionPayloadTermSpanScorer(TermSpans spans, Weight weight, Similarity.SimScorer docScorer) -
Method Summary
Modifier and TypeMethodDescriptionprotected floatThe score for the payloadprotected floatReturns the SpanScorer score only.protected voidprocessPayload(Similarity similarity) floatscore()Returns the score of the current document matching the query.protected booleanMethods inherited from class org.apache.lucene.search.spans.SpanScorer
advance, cost, docID, freq, nextDoc, sloppyFreqMethods inherited from class org.apache.lucene.search.Scorer
getChildren, getWeight, score, scoreMethods inherited from class org.apache.lucene.index.DocsEnum
attributesMethods inherited from class org.apache.lucene.search.DocIdSetIterator
empty, slowAdvance
-
Field Details
-
payload
-
payloadScore
protected float payloadScore -
payloadsSeen
protected int payloadsSeen
-
-
Constructor Details
-
PayloadTermSpanScorer
public PayloadTermSpanScorer(TermSpans spans, Weight weight, Similarity.SimScorer docScorer) throws IOException - Throws:
IOException
-
-
Method Details
-
setFreqCurrentDoc
- Overrides:
setFreqCurrentDocin classSpanScorer- Throws:
IOException
-
processPayload
- Throws:
IOException
-
score
Description copied from class:ScorerReturns 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:
scorein classSpanScorer- Returns:
getSpanScore()*getPayloadScore()- Throws:
IOException- if there is a low-level I/O error
-
getSpanScore
Returns the SpanScorer score only. Should not be overridden without good cause!- Returns:
- the score for just the Span part w/o the payload
- Throws:
IOException- if there is a low-level I/O error- See Also:
-
getPayloadScore
protected float getPayloadScore()The score for the payload- Returns:
- The score, as calculated by
PayloadFunction.docScore(int, String, int, float)
-