Skip to content

Commit bd6d308

Browse files
authored
[DOCSP-47795] Change batchsize description (#392)
* change batchsize description * address feedback * remove period * remove typo * fix wrap * wrap * ch feedback * ch feedback * fix spacing
1 parent 4473399 commit bd6d308

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

source/reference/methods.txt

+10-2
Original file line numberDiff line numberDiff line change
@@ -497,8 +497,16 @@ Cursor Methods
497497
.. arrayAccess
498498

499499
* - :method:`cursor.batchSize()`
500-
- Controls the number of documents MongoDB will return to the
501-
client in a single network message.
500+
- Specifies the maximum number of documents MongoDB can return to the
501+
client within each batch returned in a query result. By default, the initial batch
502+
size is the lesser of ``101`` documents or 16 mebibytes (MiB) worth of documents.
503+
Subsequent batches have a maximum size of 16 MiB. This option can enforce a smaller
504+
limit than 16 MiB, but not a larger one. When set, the
505+
``batchSize`` is the lesser of ``batchSize`` documents or 16 MiB worth of
506+
documents.
507+
508+
A ``batchSize`` of ``0`` means that the cursor is established, but no documents
509+
are returned in the first batch.
502510

503511
The following example query returns results in batches of
504512
100:

0 commit comments

Comments
 (0)