Table of Contents

Class SortByBuilder

Namespace
MongoDB.Driver.Builders
Assembly
MongoDB.Driver.Legacy.dll

A builder for specifying a sort order.

[Serializable]
[BsonSerializer(typeof(SortByBuilder.Serializer))]
public class SortByBuilder : BuilderBase, IConvertibleToBsonDocument, IMongoSortBy
Inheritance
SortByBuilder
Implements
Inherited Members
Extension Methods

Constructors

SortByBuilder()

Initializes a new instance of the SortByBuider class.

Methods

Ascending(params string[])

Adds keys to be sorted by in ascending order.

Descending(params string[])

Adds keys to be sorted by in descending order.

MetaTextScore(string)

Adds a key to sort by the computed relevance score when using text search. The name of the key should be the name of the projected relevance score field.

ToBsonDocument()

Returns the result of the builder as a BsonDocument.