Click or drag to resize

SearchScoreFunctionBuilder<TDocument>.Gauss Method (SearchPathDefinition<TDocument>, 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.20.0+ee01960089f28ea1b501690df5fc9f6318a70242
Syntax
public SearchScoreFunction<TDocument> Gauss(
	SearchPathDefinition<TDocument> path,
	double origin,
	double scale,
	double decay = 0.5,
	double offset = 0
)

Parameters

path
Type: MongoDB.Driver.Search.SearchPathDefinition<TDocument>
The path to the numeric field.
origin
Type: System.Double
The point of origin from which to calculate the distance.
scale
Type: System.Double
The distance from origin plus or minus offset at which scores must be multiplied.
decay (Optional)
Type: System.Double
The rate at which to multiply score values, which must be a positive number between 0 and 1 exclusive.
offset (Optional)
Type: System.Double
The number of use to determine the distance from origin.

Return Value

Type: SearchScoreFunction<TDocument>
A Guassian score function.
See Also