Skip to content

Commit 291a739

Browse files
jason-price-mongodbjason-price-mongodb
andauthored
DOCSP-33188-batch-size (#5416) (#5496)
* 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 d058937 commit 291a739

File tree

1 file changed

+17
-6
lines changed

1 file changed

+17
-6
lines changed

source/reference/command/getMore.txt

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

1818
.. dbcommand:: getMore
1919

20-
Use in conjunction with commands that return a cursor, e.g.
20+
Use in conjunction with commands that return a cursor. For example,
2121
:dbcommand:`find` and :dbcommand:`aggregate`, to return subsequent
2222
batches of documents currently pointed to by the cursor.
2323

@@ -53,7 +53,7 @@ The command accepts the following fields:
5353

5454
* - ``getMore``
5555
- long
56-
- The cursor id.
56+
- The cursor identifier.
5757

5858
* - ``collection``
5959
- string
@@ -62,7 +62,11 @@ The command accepts the following fields:
6262
* - ``batchSize``
6363
- positive integer
6464
- Optional. The number of documents to return in the batch.
65-
65+
66+
If ``batchSize`` is not set, ``getMore`` returns up to 16
67+
megabytes of data. If ``batchSize`` is set, ``getMore`` returns
68+
the smaller of 16 megabytes of data or ``batchSize`` documents.
69+
6670
* - ``maxTimeMS``
6771
- non-negative integer
6872
- Optional.
@@ -91,7 +95,7 @@ The command accepts the following fields:
9195
terminates an operation at one of its designated :term:`interrupt points <interrupt point>`.
9296

9397
- You cannot set ``maxTimeMS`` when calling ``getMore`` on a
94-
non-tailable cursor. Instead, set it via
98+
non-tailable cursor. Instead, set it using
9599
:method:`~cursor.maxTimeMS()` when you create the cursor.
96100
- To use ``getMore`` with ``maxTimeMS`` on a tailable cursor,
97101
enable ``awaitData`` when you create the cursor using :method:`cursor.tailable()`.
@@ -122,9 +126,10 @@ as well as the next batch.
122126

123127
For example, running ``getMore`` on a cursor created by a
124128
:dbcommand:`find` operation on a sharded cluster returns a document
125-
similar to the one below:
129+
similar to this output:
126130

127131
.. code-block:: javascript
132+
:copyable: false
128133

129134
{
130135
"cursor" : {
@@ -190,7 +195,7 @@ Behavior
190195
Access Control
191196
~~~~~~~~~~~~~~
192197

193-
If :ref:`authentication <authentication>` is turned on, you can
198+
If :ref:`authentication <authentication>` is enabled, you can
194199
only run ``getMore`` against cursors you created.
195200

196201
Sessions
@@ -213,3 +218,9 @@ Slow Queries
213218
~~~~~~~~~~~~
214219

215220
.. include:: /includes/getMore-slow-queries.rst
221+
222+
Learn More
223+
----------
224+
225+
- :ref:`cursor-batchSize`
226+
- :ref:`read-operations-cursors`

0 commit comments

Comments
 (0)