ScorePayload() public method

Calculate a scoring factor based on the data in the payload. Overriding implementations are responsible for interpreting what is in the payload. Lucene makes no assumptions about what is in the byte array.

The default implementation returns 1.

public ScorePayload ( int docId, System fieldName, int start, int end, byte payload, int offset, int length ) : float
docId int The docId currently being scored. If this value is , then it should be assumed that the PayloadQuery implementation does not provide document information ///
fieldName System The fieldName of the term this payload belongs to ///
start int The start position of the payload ///
end int The end position of the payload ///
payload byte The payload byte array to be scored ///
offset int The offset into the payload array ///
length int The length in the array ///
return float
コード例 #1
0
 public override float ScorePayload(int docId, string fieldName, int start, int end, byte[] payload, int offset, int length)
 {
     return(delegee.ScorePayload(docId, fieldName, start, end, payload, offset, length));
 }
コード例 #2
0
 protected internal virtual void ProcessPayload(Similarity similarity)
 {
     if (positions.IsPayloadAvailable())
     {
         payload = positions.GetPayload(payload, 0);
         payloadScore += similarity.ScorePayload(Enclosing_Instance.Enclosing_Instance.term.Field(), payload, 0, positions.GetPayloadLength());
         payloadsSeen++;
     }
     else
     {
         //zero out the payload?
     }
 }
コード例 #3
0
 public override float ScorePayload(string fieldName, byte[] payload, int offset, int length)
 {
     return(delegee.ScorePayload(fieldName, payload, offset, length));
 }