* Compute a custom score by the subQuery score and a number of ValueSourceQuery scores.

Subclasses can override this method to modify the custom score.

If your custom scoring is different than the default herein you should override at least one of the two customScore() methods. If the number of ValueSourceQueries is always < 2 it is sufficient to override the other {@link #customScore(int, float, float) customScore()} method, which is simpler.

The default computation herein is a multiplication of given scores:

                ModifiedScore = valSrcScore * valSrcScores[0] * valSrcScores[1] * ...
            

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

Syntax

C#
public virtual float CustomScore(
	int doc,
	float subQueryScore,
	float[] valSrcScores
)
Visual Basic
Public Overridable Function CustomScore ( _
	doc As Integer, _
	subQueryScore As Single, _
	valSrcScores As Single() _
) As Single
Visual C++
public:
virtual float CustomScore(
	int doc, 
	float subQueryScore, 
	array<float>^ valSrcScores
)

Parameters

doc
Type: System..::..Int32
id of scored doc
subQueryScore
Type: System..::..Single
score of that doc by the subQuery
valSrcScores
Type: array<System..::..Single>[]()[][]
scores of that doc by the ValueSourceQuery

Return Value

custom score

See Also