Table of Contents

Class SortDefinitionBuilder<TDocument>

Namespace
MongoDB.Driver
Assembly
MongoDB.Driver.dll

A builder for a SortDefinition<TDocument>.

public sealed class SortDefinitionBuilder<TDocument>

Type Parameters

TDocument

The type of the document.

Inheritance
SortDefinitionBuilder<TDocument>
Inherited Members

Methods

Ascending(FieldDefinition<TDocument>)

Creates an ascending sort.

Ascending(Expression<Func<TDocument, object>>)

Creates an ascending sort.

Combine(params SortDefinition<TDocument>[])

Creates a combined sort.

Combine(IEnumerable<SortDefinition<TDocument>>)

Creates a combined sort.

Descending(FieldDefinition<TDocument>)

Creates a descending sort.

Descending(Expression<Func<TDocument, object>>)

Creates a descending sort.

MetaSearchScoreAscending()

Creates a ascending sort on the computed relevance score of atlas search.

MetaSearchScoreDescending()

Creates a descending sort on the computed relevance score of atlas search.

MetaTextScore(string)

Creates a descending sort on the computed relevance score of a text search. The name of the key should be the name of the projected relevence score field.