Click or drag to resize

SearchScoreDefinitionBuilder<TDocument>.Boost Method (SearchPathDefinition<TDocument>, Double)

Creates a score modifier that multiples 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.20.0+ee01960089f28ea1b501690df5fc9f6318a70242
Syntax
public SearchScoreDefinition<TDocument> Boost(
	SearchPathDefinition<TDocument> path,
	double undefined = 0
)

Parameters

path
Type: MongoDB.Driver.Search.SearchPathDefinition<TDocument>
The path to the numeric field whose value to multiply the default base score by.
undefined (Optional)
Type: System.Double
The numeric value to substitute if the numeric field is not found in the documents.

Return Value

Type: SearchScoreDefinition<TDocument>
A boost score modifier.
See Also