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
pathSearchPathDefinition<TDocument>The path to the numeric field.
origindoubleThe point of origin from which to calculate the distance.
scaledoubleThe distance from
originplus or minusoffsetat which scores must be multiplied.decaydoubleThe rate at which to multiply score values, which must be a positive number between 0 and 1 exclusive.
offsetdoubleThe 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
pathExpression<Func<TDocument, double>>The path to the numeric field.
origindoubleThe point of origin from which to calculate the distance.
scaledoubleThe distance from
originplus or minusoffsetat which scores must be multiplied.decaydoubleThe rate at which to multiply score values, which must be a positive number between 0 and 1 exclusive.
offsetdoubleThe number of use to determine the distance from
origin.
Returns
- SearchScoreFunction<TDocument>
A Guassian score function.