SearchScoreFunctionBuilderTDocumentGauss Method (ExpressionFuncTDocument, Double, Double, Double, Double, Double) |
Creates a function that decays, or reduces by multiplying, the final scores of the
documents based on the distance of a numeric field from a specified origin point.
Namespace:
MongoDB.Driver.Search
Assembly:
MongoDB.Driver (in MongoDB.Driver.dll) Version: 2.22.0+75246110ed1247226fcc7f8eb2c54ffab745693e
Syntax public SearchScoreFunction<TDocument> Gauss(
Expression<Func<TDocument, double>> path,
double origin,
double scale,
double decay = 0.5,
double offset = 0
)
Public Function Gauss (
path As Expression(Of Func(Of TDocument, Double)),
origin As Double,
scale As Double,
Optional decay As Double = 0.5,
Optional offset As Double = 0
) As SearchScoreFunction(Of TDocument)
member Gauss :
path : Expression<Func<'TDocument, float>> *
origin : float *
scale : float *
?decay : float *
?offset : float
(* Defaults:
let _decay = defaultArg decay 0.5
let _offset = defaultArg offset 0
*)
-> SearchScoreFunction<'TDocument>
Parameters
- path
- Type: System.Linq.ExpressionsExpressionFuncTDocument, Double
The path to the numeric field. - origin
- Type: SystemDouble
The point of origin from which to calculate the distance. - scale
- Type: SystemDouble
The distance from origin plus or minus offset at
which scores must be multiplied.
- decay (Optional)
- Type: SystemDouble
The rate at which to multiply score values, which must be a positive number between
0 and 1 exclusive.
- offset (Optional)
- Type: SystemDouble
The number of use to determine the distance from origin.
Return Value
Type:
SearchScoreFunctionTDocumentA Guassian score function.
See Also