Method SetHint
SetHint(BsonDocument)
Sets the index hint for the query.
public virtual MongoCursor<TDocument> SetHint(BsonDocument hint)
Parameters
hint
BsonDocumentThe 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
stringThe name of the index.
Returns
- MongoCursor<TDocument>
The cursor (so you can chain method calls to it).