Table of Contents

Method SetHint

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

SetHint(BsonDocument)

Sets the index hint for the query.

public virtual MongoCursor<TDocument> SetHint(BsonDocument hint)

Parameters

hint BsonDocument

The index hint.

Returns

MongoCursor<TDocument>

The cursor (so you can chain method calls to it).

SetHint(string)

Sets the index hint for the query.

public virtual MongoCursor<TDocument> SetHint(string indexName)

Parameters

indexName string

The name of the index.

Returns

MongoCursor<TDocument>

The cursor (so you can chain method calls to it).