org.apache.lucene.search.payloads
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
protected class PayloadTermQuery.PayloadTermWeight.PayloadTermSpanScorer
- extends SpanScorer
Fields inherited from class org.apache.lucene.search.Scorer |
weight |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
payload
protected BytesRef payload
payloadScore
protected float payloadScore
payloadsSeen
protected int payloadsSeen
PayloadTermQuery.PayloadTermWeight.PayloadTermSpanScorer
public PayloadTermQuery.PayloadTermWeight.PayloadTermSpanScorer(TermSpans spans,
Weight weight,
Similarity.SimScorer docScorer)
throws IOException
- Throws:
IOException
setFreqCurrentDoc
protected boolean setFreqCurrentDoc()
throws IOException
- Overrides:
setFreqCurrentDoc
in class SpanScorer
- Throws:
IOException
processPayload
protected void processPayload(Similarity similarity)
throws IOException
- 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, until
DocIdSetIterator.nextDoc()
or DocIdSetIterator.advance(int)
is called the first time, or when called from within
Collector.collect(int)
.
- Overrides:
score
in class SpanScorer
- Returns:
getSpanScore()
* getPayloadScore()
- Throws:
IOException
- if there is a low-level I/O error
getSpanScore
protected float getSpanScore()
throws IOException
- 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:
score()
getPayloadScore
protected float getPayloadScore()
- The score for the payload
- Returns:
- The score, as calculated by
PayloadFunction.docScore(int, String, int, float)
Copyright © 2000-2014 Apache Software Foundation. All Rights Reserved.