Module org.apache.lucene.queries
Class PayloadScoreQuery.PayloadSpans
- java.lang.Object
-
- org.apache.lucene.search.DocIdSetIterator
-
- org.apache.lucene.queries.spans.Spans
-
- org.apache.lucene.queries.spans.FilterSpans
-
- org.apache.lucene.queries.payloads.PayloadScoreQuery.PayloadSpans
-
- All Implemented Interfaces:
SpanCollector
- Enclosing class:
- PayloadScoreQuery
private class PayloadScoreQuery.PayloadSpans extends FilterSpans implements SpanCollector
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.apache.lucene.queries.spans.FilterSpans
FilterSpans.AcceptStatus
-
-
Field Summary
Fields Modifier and Type Field Description private PayloadDecoder
decoder
float
payloadScore
int
payloadsSeen
-
Fields inherited from class org.apache.lucene.queries.spans.FilterSpans
in
-
Fields inherited from class org.apache.lucene.queries.spans.Spans
NO_MORE_POSITIONS
-
Fields inherited from class org.apache.lucene.search.DocIdSetIterator
NO_MORE_DOCS
-
-
Constructor Summary
Constructors Modifier Constructor Description private
PayloadSpans(Spans in, PayloadDecoder decoder)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected FilterSpans.AcceptStatus
accept(Spans candidate)
Returns YES if the candidate should be an accepted match, NO if it should not, and NO_MORE_IN_CURRENT_DOC if iteration should move on to the next document.void
collectLeaf(PostingsEnum postings, int position, Term term)
Collect information from postingsprotected void
doCurrentSpans()
Called each time the scorer's SpanScorer is advanced during frequency calculationprotected void
doStartCurrentDoc()
Called before the current doc's frequency is calculatedvoid
reset()
Call to indicate that the driving Spans has moved to a new position-
Methods inherited from class org.apache.lucene.queries.spans.FilterSpans
advance, asTwoPhaseIterator, collect, cost, docID, endPosition, nextDoc, nextStartPosition, positionsCost, startPosition, toString, width
-
Methods inherited from class org.apache.lucene.search.DocIdSetIterator
all, empty, range, slowAdvance
-
-
-
-
Field Detail
-
decoder
private final PayloadDecoder decoder
-
payloadsSeen
public int payloadsSeen
-
payloadScore
public float payloadScore
-
-
Constructor Detail
-
PayloadSpans
private PayloadSpans(Spans in, PayloadDecoder decoder)
-
-
Method Detail
-
accept
protected FilterSpans.AcceptStatus accept(Spans candidate) throws java.io.IOException
Description copied from class:FilterSpans
Returns YES if the candidate should be an accepted match, NO if it should not, and NO_MORE_IN_CURRENT_DOC if iteration should move on to the next document.- Specified by:
accept
in classFilterSpans
- Throws:
java.io.IOException
-
doStartCurrentDoc
protected void doStartCurrentDoc()
Description copied from class:Spans
Called before the current doc's frequency is calculated- Overrides:
doStartCurrentDoc
in classSpans
-
collectLeaf
public void collectLeaf(PostingsEnum postings, int position, Term term) throws java.io.IOException
Description copied from interface:SpanCollector
Collect information from postings- Specified by:
collectLeaf
in interfaceSpanCollector
- Parameters:
postings
- aPostingsEnum
position
- the position of the PostingsEnumterm
- theTerm
for this postings list- Throws:
java.io.IOException
- on error
-
reset
public void reset()
Description copied from interface:SpanCollector
Call to indicate that the driving Spans has moved to a new position- Specified by:
reset
in interfaceSpanCollector
-
doCurrentSpans
protected void doCurrentSpans() throws java.io.IOException
Description copied from class:Spans
Called each time the scorer's SpanScorer is advanced during frequency calculation- Overrides:
doCurrentSpans
in classSpans
- Throws:
java.io.IOException
-
-