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 @@ -210,9 +210,16 @@ of ``Watch()`` and ``WatchAsync()``:
210
210
include expanded events in a change stream, create the change stream
211
211
cursor and set this parameter to ``True``.
212
212
213
- * - ``BatchSize``
214
- - | Specifies the maximum number of change events to return in each batch of the
215
- response from the MongoDB cluster.
213
+ * - ``batchSize``
214
+ - | Specifies the maximum number of documents that a change
215
+ stream can return in each batch, which applies to ``Watch()`` or
216
+ ``WatchAsync()``. If the ``batchSize`` option is not set, watch functions have an
217
+ initial batch size of ``101`` documents and a maximum size of 16 mebibytes (MiB)
218
+ for each subsequent batch. This option can
219
+ enforce a smaller limit than 16 MiB, but not a larger one. If
220
+ you set ``batchSize`` to a limit that result in batches
221
+ larger than 16 MiB, this option has no effect and ``Watch()``
222
+ or ``WatchAsync()`` uses the default batch size.
216
223
217
224
* - ``Collation``
218
225
- | 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