Method Gauss
Gauss(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.
public SearchScoreFunction<TDocument> Gauss(SearchPathDefinition<TDocument> path, double origin, double scale, double decay = 0.5, double offset = 0)
Parameters
path
SearchPathDefinition<TDocument>The path to the numeric field.
origin
doubleThe point of origin from which to calculate the distance.
scale
doubleThe distance from
origin
plus or minusoffset
at which scores must be multiplied.decay
doubleThe rate at which to multiply score values, which must be a positive number between 0 and 1 exclusive.
offset
doubleThe number of use to determine the distance from
origin
.
Returns
- SearchScoreFunction<TDocument>
A Guassian score function.
Gauss(Expression<Func<TDocument, 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.
public SearchScoreFunction<TDocument> Gauss(Expression<Func<TDocument, double>> path, double origin, double scale, double decay = 0.5, double offset = 0)
Parameters
path
Expression<Func<TDocument, double>>The path to the numeric field.
origin
doubleThe point of origin from which to calculate the distance.
scale
doubleThe distance from
origin
plus or minusoffset
at which scores must be multiplied.decay
doubleThe rate at which to multiply score values, which must be a positive number between 0 and 1 exclusive.
offset
doubleThe number of use to determine the distance from
origin
.
Returns
- SearchScoreFunction<TDocument>
A Guassian score function.