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 SetHint(BsonDocument hint)

Parameters

hint BsonDocument

The index hint.

Returns

MongoCursor

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

SetHint(string)

Sets the index hint for the query.

public virtual MongoCursor SetHint(string indexName)

Parameters

indexName string

The name of the index.

Returns

MongoCursor

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