Table of Contents

Method Path

Namespace
MongoDB.Driver.Search
Assembly
MongoDB.Driver.dll

Path(SearchPathDefinition<TDocument>, double)

Creates a function that incorporates an indexed numeric field value into the score.

public SearchScoreFunction<TDocument> Path(SearchPathDefinition<TDocument> path, double undefined = 0)

Parameters

path SearchPathDefinition<TDocument>

The path to the numeric field.

undefined double

The value to use if the numeric field specified using path is missing in the document.

Returns

SearchScoreFunction<TDocument>

A path score function.

Path(Expression<Func<TDocument, double>>, double)

Creates a function that incorporates an indexed numeric field value into the score.

public SearchScoreFunction<TDocument> Path(Expression<Func<TDocument, double>> path, double undefined = 0)

Parameters

path Expression<Func<TDocument, double>>

The path to the numeric field.

undefined double

The value to use if the numeric field specified using path is missing in the document.

Returns

SearchScoreFunction<TDocument>

A path score function.