File tree 2 files changed +17
-4
lines changed
source/fundamentals/crud/read-operations
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()``:
284
284
include expanded events in a change stream, create the change stream
285
285
cursor and set this parameter to ``True``.
286
286
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.
290
297
291
298
* - ``Collation``
292
299
- | 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:
205
205
- Description
206
206
207
207
* - ``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.
209
215
210
216
* - ``Collation``
211
217
- | Sets the collation options.
You can’t perform that action at this time.
0 commit comments