File tree 1 file changed +10
-2
lines changed
1 file changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -497,8 +497,16 @@ Cursor Methods
497
497
.. arrayAccess
498
498
499
499
* - :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.
502
510
503
511
The following example query returns results in batches of
504
512
100:
You can’t perform that action at this time.
0 commit comments