@@ -17,9 +17,7 @@ Definition
17
17
18
18
.. dbcommand:: getMore
19
19
20
- .. versionadded:: 3.2
21
-
22
- Use in conjunction with commands that return a cursor, e.g.
20
+ Use in conjunction with commands that return a cursor. For example,
23
21
:dbcommand:`find` and :dbcommand:`aggregate`, to return subsequent
24
22
batches of documents currently pointed to by the cursor.
25
23
@@ -59,9 +57,7 @@ The command accepts the following fields:
59
57
60
58
- long
61
59
62
- - The cursor id.
63
-
64
-
60
+ - The cursor identifier.
65
61
66
62
* - ``collection``
67
63
@@ -76,8 +72,10 @@ The command accepts the following fields:
76
72
- positive integer
77
73
78
74
- Optional. The number of documents to return in the batch.
79
-
80
-
75
+
76
+ If ``batchSize`` is not set, ``getMore`` returns up to 16
77
+ megabytes of data. If ``batchSize`` is set, ``getMore`` returns
78
+ the smaller of 16 megabytes of data or ``batchSize`` documents.
81
79
82
80
* - ``maxTimeMS``
83
81
@@ -107,7 +105,7 @@ The command accepts the following fields:
107
105
terminates an operation at one of its designated :term:`interrupt points <interrupt point>`.
108
106
109
107
- You cannot set ``maxTimeMS`` when calling ``getMore`` on a
110
- non-tailable cursor. Instead, set it via
108
+ non-tailable cursor. Instead, set it using
111
109
:method:`~cursor.maxTimeMS()` when you create the cursor.
112
110
- To use ``getMore`` with ``maxTimeMS`` on a tailable cursor,
113
111
enable ``awaitData`` when you create the cursor using :method:`cursor.tailable()`.
@@ -140,9 +138,10 @@ as well as the next batch.
140
138
141
139
For example, running ``getMore`` on a cursor created by a
142
140
:dbcommand:`find` operation on a sharded cluster returns a document
143
- similar to the one below :
141
+ similar to this output :
144
142
145
143
.. code-block:: javascript
144
+ :copyable: false
146
145
147
146
{
148
147
"cursor" : {
@@ -208,7 +207,7 @@ Behavior
208
207
Access Control
209
208
~~~~~~~~~~~~~~
210
209
211
- If :ref:`authentication <authentication>` is turned on , you can
210
+ If :ref:`authentication <authentication>` is enabled , you can
212
211
only run ``getMore`` against cursors you created.
213
212
214
213
Sessions
@@ -226,4 +225,3 @@ Transactions
226
225
For :ref:`multi-document transactions <transactions>`:
227
226
228
227
.. include:: /includes/extracts/transactions-operations-getMore.rst
229
-
0 commit comments