Class PayloadNearQuery.PayloadNearSpanScorer
- 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.PayloadNearQuery.PayloadNearSpanScorer
-
- Enclosing class:
- PayloadNearQuery
public class PayloadNearQuery.PayloadNearSpanScorer extends SpanScorer
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.apache.lucene.search.Scorer
Scorer.ChildScorer
-
-
Field Summary
Fields Modifier and Type Field Description protected floatpayloadScore-
Fields inherited from class org.apache.lucene.search.spans.SpanScorer
doc, docScorer, freq, more, numMatches
-
Fields inherited from class org.apache.lucene.index.DocsEnum
FLAG_FREQS, FLAG_NONE
-
Fields inherited from class org.apache.lucene.search.DocIdSetIterator
NO_MORE_DOCS
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedPayloadNearSpanScorer(Spans spans, Weight weight, Similarity similarity, Similarity.SimScorer docScorer)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidgetPayloads(Spans[] subSpans)protected voidprocessPayloads(Collection<byte[]> payLoads, int start, int end)By default, uses thePayloadFunctionto score the payloads, but can be overridden to do other things.floatscore()Returns the score of the current document matching the query.protected booleansetFreqCurrentDoc()-
Methods inherited from class org.apache.lucene.search.spans.SpanScorer
advance, cost, docID, freq, nextDoc, sloppyFreq
-
Methods inherited from class org.apache.lucene.search.Scorer
getChildren, getWeight, score, score
-
Methods inherited from class org.apache.lucene.index.DocsEnum
attributes
-
Methods inherited from class org.apache.lucene.search.DocIdSetIterator
empty, slowAdvance
-
-
-
-
Constructor Detail
-
PayloadNearSpanScorer
protected PayloadNearSpanScorer(Spans spans, Weight weight, Similarity similarity, Similarity.SimScorer docScorer) 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 thePayloadFunctionto 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:
setFreqCurrentDocin classSpanScorer- Throws:
IOException
-
score
public float score() throws IOExceptionDescription 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- Throws:
IOException
-
-