Table of Contents

Method MetaTextScore

Namespace
MongoDB.Driver
Assembly
MongoDB.Driver.dll

MetaTextScore<TDocument>(SortDefinition<TDocument>, string)

Combines an existing sort with a descending sort on the computed relevance score of a text search. The field name should be the name of the projected relevance score field.

public static SortDefinition<TDocument> MetaTextScore<TDocument>(this SortDefinition<TDocument> sort, string field)

Parameters

sort SortDefinition<TDocument>

The sort.

field string

The field.

Returns

SortDefinition<TDocument>

A combined sort.

Type Parameters

TDocument

The type of the document.