Class PayloadFunction
- java.lang.Object
-
- org.apache.lucene.search.payloads.PayloadFunction
-
- Direct Known Subclasses:
AveragePayloadFunction
,MaxPayloadFunction
,MinPayloadFunction
public abstract class PayloadFunction extends java.lang.Object
An abstract class that defines a way for Payload*Query instances to transform the cumulative effects of payload scores for a document.- See Also:
for more information
-
-
Constructor Summary
Constructors Constructor Description PayloadFunction()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract float
currentScore(int docId, java.lang.String field, int start, int end, int numPayloadsSeen, float currentScore, float currentPayloadScore)
Calculate the score up to this point for this doc and fieldabstract float
docScore(int docId, java.lang.String field, int numPayloadsSeen, float payloadScore)
Calculate the final score for all the payloads seen so far for this doc/fieldabstract boolean
equals(java.lang.Object o)
Explanation
explain(int docId, java.lang.String field, int numPayloadsSeen, float payloadScore)
abstract int
hashCode()
-
-
-
Method Detail
-
currentScore
public abstract float currentScore(int docId, java.lang.String field, int start, int end, int numPayloadsSeen, float currentScore, float currentPayloadScore)
Calculate the score up to this point for this doc and field- Parameters:
docId
- The current docfield
- The fieldstart
- The start position of the matching Spanend
- The end position of the matching SpannumPayloadsSeen
- The number of payloads seen so farcurrentScore
- The current score so farcurrentPayloadScore
- The score for the current payload- Returns:
- The new current Score
- See Also:
Spans
-
docScore
public abstract float docScore(int docId, java.lang.String field, int numPayloadsSeen, float payloadScore)
Calculate the final score for all the payloads seen so far for this doc/field- Parameters:
docId
- The current docfield
- The current fieldnumPayloadsSeen
- The total number of payloads seen on this documentpayloadScore
- The raw score for those payloads- Returns:
- The final score for the payloads
-
explain
public Explanation explain(int docId, java.lang.String field, int numPayloadsSeen, float payloadScore)
-
hashCode
public abstract int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
equals
public abstract boolean equals(java.lang.Object o)
- Overrides:
equals
in classjava.lang.Object
-
-