Skip to content

Commit fdcf61c

Browse files
committed
PYTHON-1615 Update Cursor.hint doc
1 parent eabc8d9 commit fdcf61c

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

pymongo/cursor.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -827,9 +827,9 @@ def hint(self, index):
827827
Judicious use of hints can greatly improve query
828828
performance. When doing a query on multiple fields (at least
829829
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
830+
the query. Raises :class:`~pymongo.errors.OperationFailure` if the
831+
provided hint requires an index that does not exist on this collection,
832+
and raises :class:`~pymongo.errors.InvalidOperation` if this cursor has
833833
already been used.
834834
835835
`index` should be an index as passed to

0 commit comments

Comments
 (0)