File tree Expand file tree Collapse file tree 2 files changed +17
-4
lines changed
source/fundamentals/crud/read-operations Expand file tree Collapse file tree 2 files changed +17
-4
lines changed Original file line number Diff line number Diff line change @@ -284,9 +284,16 @@ of ``Watch()`` and ``WatchAsync()``:
284284 include expanded events in a change stream, create the change stream
285285 cursor and set this parameter to ``True``.
286286
287- * - ``BatchSize``
288- - | Specifies the maximum number of change events to return in each batch of the
289- response from the MongoDB cluster.
287+ * - ``batchSize``
288+ - | Specifies the maximum number of documents that a change
289+ stream can return in each batch, which applies to ``Watch()`` or
290+ ``WatchAsync()``. If the ``batchSize`` option is not set, watch functions have an
291+ initial batch size of ``101`` documents and a maximum size of 16 mebibytes (MiB)
292+ for each subsequent batch. This option can
293+ enforce a smaller limit than 16 MiB, but not a larger one. If
294+ you set ``batchSize`` to a limit that result in batches
295+ larger than 16 MiB, this option has no effect and ``Watch()``
296+ or ``WatchAsync()`` uses the default batch size.
290297
291298 * - ``Collation``
292299 - | Specifies the collation to use for the change stream cursor.
Original file line number Diff line number Diff line change @@ -205,7 +205,13 @@ You can configure the commonly used options with the following methods:
205205 - Description
206206
207207 * - ``BatchSize``
208- - | Gets or sets the number of documents to hold in a cursor at a given time.
208+ - | Gets or sets the maximum number of documents within each
209+ batch returned in a query result. If ``batchSize`` is not set, the ``Find()``
210+ method has an initial batch size of ``101`` documents and a maximum size of 16
211+ mebibytes (MiB) for each subsequent batch. This option can enforce a smaller
212+ limit than 16 MiB, but not a larger one. If you set ``batchSize`` to a limit that
213+ results in batches larger than 16 MiB, this option has no effect and the
214+ ``Find()`` method uses the default batch size.
209215
210216 * - ``Collation``
211217 - | Sets the collation options.
You can’t perform that action at this time.
0 commit comments