Skip to content

Commit 5a21f3d

Browse files
jason-price-mongodbjason-price-mongodb
andauthored
DOCSP-33188-batch-size (#5416) (#5501)
* DOCSP-33188-batch-size * DOCSP-33188-batch-size * DOCSP-33188-batch-size * DOCSP-33188-batch-size --------- Co-authored-by: jason-price-mongodb <[email protected]>
1 parent 47ff91f commit 5a21f3d

File tree

1 file changed

+10
-12
lines changed

1 file changed

+10
-12
lines changed

source/reference/command/getMore.txt

Lines changed: 10 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,7 @@ Definition
1717

1818
.. dbcommand:: getMore
1919

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,
2321
:dbcommand:`find` and :dbcommand:`aggregate`, to return subsequent
2422
batches of documents currently pointed to by the cursor.
2523

@@ -59,9 +57,7 @@ The command accepts the following fields:
5957

6058
- long
6159

62-
- The cursor id.
63-
64-
60+
- The cursor identifier.
6561

6662
* - ``collection``
6763

@@ -76,8 +72,10 @@ The command accepts the following fields:
7672
- positive integer
7773

7874
- 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.
8179

8280
* - ``maxTimeMS``
8381

@@ -107,7 +105,7 @@ The command accepts the following fields:
107105
terminates an operation at one of its designated :term:`interrupt points <interrupt point>`.
108106

109107
- 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
111109
:method:`~cursor.maxTimeMS()` when you create the cursor.
112110
- To use ``getMore`` with ``maxTimeMS`` on a tailable cursor,
113111
enable ``awaitData`` when you create the cursor using :method:`cursor.tailable()`.
@@ -140,9 +138,10 @@ as well as the next batch.
140138

141139
For example, running ``getMore`` on a cursor created by a
142140
:dbcommand:`find` operation on a sharded cluster returns a document
143-
similar to the one below:
141+
similar to this output:
144142

145143
.. code-block:: javascript
144+
:copyable: false
146145

147146
{
148147
"cursor" : {
@@ -208,7 +207,7 @@ Behavior
208207
Access Control
209208
~~~~~~~~~~~~~~
210209

211-
If :ref:`authentication <authentication>` is turned on, you can
210+
If :ref:`authentication <authentication>` is enabled, you can
212211
only run ``getMore`` against cursors you created.
213212

214213
Sessions
@@ -226,4 +225,3 @@ Transactions
226225
For :ref:`multi-document transactions <transactions>`:
227226

228227
.. include:: /includes/extracts/transactions-operations-getMore.rst
229-

0 commit comments

Comments
 (0)