Class PayloadFunction
java.lang.Object
org.apache.lucene.queries.payloads.PayloadFunction
- Direct Known Subclasses:
AveragePayloadFunction
,MaxPayloadFunction
,MinPayloadFunction
,SumPayloadFunction
An abstract class that defines a way for PayloadScoreQuery instances to transform the cumulative
effects of payload scores for a document.
- See Also:
- WARNING: This API is experimental and might change in incompatible ways in the next release.
- This class and its derivations are experimental and subject to change
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionabstract float
currentScore
(int docId, 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
Calculate the final score for all the payloads seen so far for this doc/fieldabstract boolean
abstract int
hashCode()
-
Constructor Details
-
PayloadFunction
public PayloadFunction()
-
-
Method Details
-
currentScore
public abstract float currentScore(int docId, 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:
-
docScore
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
-
hashCode
public abstract int hashCode() -
equals
-