SearchScoreDefinitionBuilderTDocumentBoost Method (ExpressionFuncTDocument, Double, Double) |
Creates a score modifier that multiplies a result's base score by the value of a numeric
field in the documents.
Namespace:
MongoDB.Driver.Search
Assembly:
MongoDB.Driver (in MongoDB.Driver.dll) Version: 2.22.0+75246110ed1247226fcc7f8eb2c54ffab745693e
Syntax public SearchScoreDefinition<TDocument> Boost(
Expression<Func<TDocument, double>> path,
double undefined = 0
)
Public Function Boost (
path As Expression(Of Func(Of TDocument, Double)),
Optional undefined As Double = 0
) As SearchScoreDefinition(Of TDocument)
member Boost :
path : Expression<Func<'TDocument, float>> *
?undefined : float
(* Defaults:
let _undefined = defaultArg undefined 0
*)
-> SearchScoreDefinition<'TDocument>
Parameters
- path
- Type: System.Linq.ExpressionsExpressionFuncTDocument, Double
The path to the numeric field whose value to multiply the default base score by.
- undefined (Optional)
- Type: SystemDouble
The numeric value to substitute if the numeric field is not found in the documents.
Return Value
Type:
SearchScoreDefinitionTDocument
A boost score modifier.
See Also