Method CustomScore
CustomScore(Int32, Single, Single[])
Compute a custom score by the subQuery score and a number of ValueSourceQuery scores.
The doc is relative to the current reader, which is unknown to CustomScoreQuery when using per-segment search (since Lucene 2.9). Please override GetCustomScoreProvider(IndexReader) and return a subclass of CustomScoreProvider for the given IndexReader. see CustomScoreProvider#customScore(int,float,float[])
Declaration
public virtual float CustomScore(int doc, float subQueryScore, float[] valSrcScores)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | doc | |
System.Single | subQueryScore | |
System.Single[] | valSrcScores |
Returns
Type | Description |
---|---|
System.Single |
CustomScore(Int32, Single, Single)
Compute a custom score by the subQuery score and the ValueSourceQuery score.
The doc is relative to the current reader, which is unknown to CustomScoreQuery when using per-segment search (since Lucene 2.9). Please override GetCustomScoreProvider(IndexReader) and return a subclass of CustomScoreProvider for the given IndexReader.
Declaration
public virtual float CustomScore(int doc, float subQueryScore, float valSrcScore)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | doc | |
System.Single | subQueryScore | |
System.Single | valSrcScore |
Returns
Type | Description |
---|---|
System.Single |