Method ScorePayload
ScorePayload(Int32, String, Int32, Int32, Byte[], Int32, Int32)
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.
Declaration
public virtual float ScorePayload(int docId, String fieldName, int start, int end, byte[] payload, int offset, int length)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | docId | The docId currently being scored. If this value is NO_DOC_ID_PROVIDED, then it should be assumed that the PayloadQuery implementation does not provide document information |
System.String | fieldName | The fieldName of the term this payload belongs to |
System.Int32 | start | The start position of the payload |
System.Int32 | end | The end position of the payload |
System.Byte[] | payload | The payload byte array to be scored |
System.Int32 | offset | The offset into the payload array |
System.Int32 | length | The length in the array |
Returns
Type | Description |
---|---|
System.Single | An implementation dependent float to be used as a scoring factor |