There was an error while loading. Please reload this page.
1 parent eabc8d9 commit fdcf61cCopy full SHA for fdcf61c
pymongo/cursor.py
@@ -827,9 +827,9 @@ def hint(self, index):
827
Judicious use of hints can greatly improve query
828
performance. When doing a query on multiple fields (at least
829
one of which is indexed) pass the indexed field as a hint to
830
- the query. Hinting will not do anything if the corresponding
831
- index does not exist. Raises
832
- :class:`~pymongo.errors.InvalidOperation` if this cursor has
+ the query. Raises :class:`~pymongo.errors.OperationFailure` if the
+ provided hint requires an index that does not exist on this collection,
+ and raises :class:`~pymongo.errors.InvalidOperation` if this cursor has
833
already been used.
834
835
`index` should be an index as passed to
0 commit comments