Class PayloadScoreQuery.PayloadSpans
- java.lang.Object
-
- org.apache.lucene.search.DocIdSetIterator
-
- org.apache.lucene.search.spans.Spans
-
- org.apache.lucene.search.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.search.spans.FilterSpans
FilterSpans.AcceptStatus
-
-
Field Summary
Fields Modifier and Type Field Description private PayloadDecoderdecoderfloatpayloadScoreintpayloadsSeen-
Fields inherited from class org.apache.lucene.search.spans.FilterSpans
in
-
Fields inherited from class org.apache.lucene.search.spans.Spans
NO_MORE_POSITIONS
-
Fields inherited from class org.apache.lucene.search.DocIdSetIterator
NO_MORE_DOCS
-
-
Constructor Summary
Constructors Modifier Constructor Description privatePayloadSpans(Spans in, PayloadDecoder decoder)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected FilterSpans.AcceptStatusaccept(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.voidcollectLeaf(PostingsEnum postings, int position, Term term)Collect information from postingsprotected voiddoCurrentSpans()Called each time the scorer's SpanScorer is advanced during frequency calculationprotected voiddoStartCurrentDoc()Called before the current doc's frequency is calculatedvoidreset()Call to indicate that the driving Spans has moved to a new position-
Methods inherited from class org.apache.lucene.search.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:FilterSpansReturns 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:
acceptin classFilterSpans- Throws:
java.io.IOException
-
doStartCurrentDoc
protected void doStartCurrentDoc()
Description copied from class:SpansCalled before the current doc's frequency is calculated- Overrides:
doStartCurrentDocin classSpans
-
collectLeaf
public void collectLeaf(PostingsEnum postings, int position, Term term) throws java.io.IOException
Description copied from interface:SpanCollectorCollect information from postings- Specified by:
collectLeafin interfaceSpanCollector- Parameters:
postings- aPostingsEnumposition- the position of the PostingsEnumterm- theTermfor this postings list- Throws:
java.io.IOException- on error
-
reset
public void reset()
Description copied from interface:SpanCollectorCall to indicate that the driving Spans has moved to a new position- Specified by:
resetin interfaceSpanCollector
-
doCurrentSpans
protected void doCurrentSpans() throws java.io.IOExceptionDescription copied from class:SpansCalled each time the scorer's SpanScorer is advanced during frequency calculation- Overrides:
doCurrentSpansin classSpans- Throws:
java.io.IOException
-
-