The CustomScoreProvider type exposes the following members.

Constructors

  NameDescription
Public methodCustomScoreProvider
Creates a new instance of the provider class for the given IndexReader.

Methods

  NameDescription
Public methodCustomExplain(Int32, Explanation, Explanation)
Explain the custom score. Whenever overriding {@link #customScore(int, float, float)}, this method should also be overridden to provide the correct explanation for the part of the custom scoring.
Public methodCustomExplain(Int32, Explanation, array<Explanation>[]()[][])
Explain the custom score. Whenever overriding {@link #customScore(int, float, float[])}, this method should also be overridden to provide the correct explanation for the part of the custom scoring.
Public methodCustomScore(Int32, Single, Single)
Public methodCustomScore(Int32, Single, array<Single>[]()[][])
* 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] * ...
            
Public methodEquals
Determines whether the specified Object is equal to the current Object.
(Inherited from Object.)
Protected methodFinalize
Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection.
(Inherited from Object.)
Public methodGetHashCode
Serves as a hash function for a particular type.
(Inherited from Object.)
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Protected methodMemberwiseClone
Creates a shallow copy of the current Object.
(Inherited from Object.)
Public methodToString
Returns a String that represents the current Object.
(Inherited from Object.)

Fields

  NameDescription
Protected fieldreader

See Also