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.

Namespace: Lucene.Net.Search
Assembly: Lucene.Net (in Lucene.Net.dll) Version: 2.9.4.1

Syntax

C#
public virtual float ScorePayload(
	int docId,
	string fieldName,
	int start,
	int end,
	byte[] payload,
	int offset,
	int length
)
Visual Basic
Public Overridable Function ScorePayload ( _
	docId As Integer, _
	fieldName As String, _
	start As Integer, _
	end As Integer, _
	payload As Byte(), _
	offset As Integer, _
	length As Integer _
) As Single
Visual C++
public:
virtual float ScorePayload(
	int docId, 
	String^ fieldName, 
	int start, 
	int end, 
	array<unsigned char>^ payload, 
	int offset, 
	int length
)

Parameters

docId
Type: System..::..Int32
The docId currently being scored. If this value is {@link #NO_DOC_ID_PROVIDED}, then it should be assumed that the PayloadQuery implementation does not provide document information
fieldName
Type: System..::..String
The fieldName of the term this payload belongs to
start
Type: System..::..Int32
The start position of the payload
end
Type: System..::..Int32
The end position of the payload
payload
Type: array<System..::..Byte>[]()[][]
The payload byte array to be scored
offset
Type: System..::..Int32
The offset into the payload array
length
Type: System..::..Int32
The length in the array

Return Value

An implementation dependent float to be used as a scoring factor

See Also