Skip to content

Commit 38957d7

Browse files
NoOutletkay-kim
authored andcommitted
DOCS-5125 Fix syntax for maxTimeMS
Description of maxTimeMS included an alternative to the shortcut which used incorrect syntax. The incorrect command did not limit the time for retrieving results and instead created a inclusive projection on a field named '$maxTimeMS' which would hopefully not be an actual field in the user database. Signed-off-by: kay <[email protected]>
1 parent 6f3fbec commit 38957d7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

source/reference/operator/meta/maxTimeMS.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ $maxTimeMS
2222

2323
.. code-block:: javascript
2424

25-
db.collection.find( { } , { $maxTimeMS: 100 } )
25+
db.collection.find( { $query: { }, $maxTimeMS: 100 } )
2626
db.collection.find( { } )._addSpecial("$maxTimeMS", 100)
2727

2828
Interrupted operations return an error message similar to the

0 commit comments

Comments
 (0)