File tree Expand file tree Collapse file tree 3 files changed +10
-10
lines changed Expand file tree Collapse file tree 3 files changed +10
-10
lines changed Original file line number Diff line number Diff line change 1
1
ref : watch-option-batchSize
2
2
content : |
3
- The maximum number of documents within each batch returned in a query result , which applies
3
+ The maximum number of documents within each batch returned in a change stream , which applies
4
4
to the ``aggregate`` command. By default, the ``aggregate`` command has an initial batch size of
5
5
``101`` documents and a maximum size of 16 mebibytes (MiB) for each subsequent batch. This
6
6
option can enforce a smaller limit than 16 MiB, but not a larger one. If you set ``batchSize``
7
7
to a limit that results in batches larger than 16 MiB, this option has no effect.
8
+
9
+ Irrespective of the ``batchSize`` option, the initial ``aggregate`` command
10
+ response for a change stream generally does not include any documents
11
+ unless another option is used to configure its starting point (e.g.
12
+ ``startAfter``).
8
13
---
9
14
ref : watch-option-fullDocument
10
15
content : |
Original file line number Diff line number Diff line change @@ -52,15 +52,14 @@ Parameters
52
52
53
53
* - batchSize
54
54
- integer
55
- - The maximum number of documents to return in the first batch . By default, the ``find() ``
56
- command has an initial batch size of ``101`` documents. This
57
- option can enforce a smaller limit than 16 mebibytes (MiB), but not a larger
55
+ - The maximum number of documents within each batch returned in a query result . By default, the ``find``
56
+ command has an initial batch size of ``101`` documents and a maximum size of 16 mebibytes (MiB)
57
+ for each subsequent batch. This option can enforce a smaller limit than 16 mebibytes (MiB), but not a larger
58
58
one. If you set ``batchSize`` to a limit that results in batches larger than
59
59
16 MiB, this option has no effect.
60
60
61
61
A batchSize of ``0`` means that the cursor will be established, but no documents
62
- will be returned in the first batch. This may be useful for quickly returning a cursor
63
- or failure without doing significant server-side work.
62
+ will be returned in the first batch.
64
63
65
64
Unlike the previous wire protocol version, a batchSize of ``1`` for the
66
65
:dbcommand:`find` command does not close the cursor.
Original file line number Diff line number Diff line change @@ -47,10 +47,6 @@ Parameters
47
47
one. If you set ``batchSize`` to a limit that results in batches larger than
48
48
16 MiB, this option has no effect.
49
49
50
- A batchSize of ``0`` means that the cursor will be established, but no documents
51
- will be returned in the first batch. This may be useful for quickly returning a cursor
52
- or failure from ``aggregate`` without doing significant server-side work.
53
-
54
50
* - codec
55
51
- MongoDB\\Codec\\DocumentCodec
56
52
- .. include:: /includes/extracts/collection-option-codec.rst
You can’t perform that action at this time.
0 commit comments