File tree 5 files changed +35
-28
lines changed
5 files changed +35
-28
lines changed Original file line number Diff line number Diff line change 1
1
ref : watch-option-batchSize
2
2
content : |
3
- Specifies the batch size for the cursor, which will apply to both the initial
4
- ``aggregate`` command and any subsequent ``getMore`` commands. This determines
5
- the maximum number of change events to return in each response from the
6
- server.
3
+ The maximum number of documents within each batch returned in a change stream, which applies
4
+ to the ``aggregate`` command. By default, the ``aggregate`` command has an initial batch size of
5
+ ``101`` documents and a maximum size of 16 mebibytes (MiB) for each subsequent batch. This
6
+ option can enforce a smaller limit than 16 MiB, but not a larger one. If you set ``batchSize``
7
+ to a limit that results in batches larger than 16 MiB, this option has no effect.
7
8
8
9
Irrespective of the ``batchSize`` option, the initial ``aggregate`` command
9
10
response for a change stream generally does not include any documents
Original file line number Diff line number Diff line change @@ -180,7 +180,12 @@ you can set in the array:
180
180
- Description
181
181
182
182
* - ``batchSize``
183
- - | The number of documents to return per batch. The default value is ``101``.
183
+ - | The maximum number of documents within each batch returned in a query result. By default,
184
+ the ``find`` command has an initial batch size of ``101`` documents
185
+ and a maximum size of 16 mebibytes (MiB) for each subsequent batch. This
186
+ option can enforce a smaller limit than 16 MiB, but not a larger
187
+ one. If you set ``batchSize`` to a limit that results in batches larger than
188
+ 16 MiB, this option has no effect.
184
189
| **Type**: ``integer``
185
190
186
191
* - ``collation``
Original file line number Diff line number Diff line change @@ -54,9 +54,14 @@ Parameters
54
54
55
55
* - batchSize
56
56
- integer
57
- - The number of documents to return in the first batch. Defaults to
58
- ``101``. A batchSize of ``0`` means that the cursor will be
59
- established, but no documents will be returned in the first batch.
57
+ - The maximum number of documents within each batch returned in a query result. By default, the ``find``
58
+ command has an initial batch size of ``101`` documents and a maximum size of 16 mebibytes (MiB)
59
+ for each subsequent batch. This option can enforce a smaller limit than 16 MiB, but not a larger
60
+ one. If you set ``batchSize`` to a limit that results in batches larger than
61
+ 16 MiB, this option has no effect.
62
+
63
+ A batchSize of ``0`` means that the cursor will be established, but no documents
64
+ will be returned in the first batch.
60
65
61
66
Unlike the previous wire protocol version, a batchSize of ``1`` for the
62
67
:dbcommand:`find` command does not close the cursor.
Original file line number Diff line number Diff line change @@ -41,16 +41,12 @@ Parameters
41
41
42
42
* - batchSize
43
43
- integer
44
- - Specifies the batch size for the cursor, which will apply to both the
45
- initial ``aggregate`` command and any subsequent ``getMore`` commands.
46
- This determines the maximum number of documents to return in each
47
- response from the server.
48
-
49
- A batchSize of ``0`` is special in that and will only apply to the
50
- initial ``aggregate`` command; subsequent ``getMore`` commands will use
51
- the server's default batch size. This may be useful for quickly
52
- returning a cursor or failure from ``aggregate`` without doing
53
- significant server-side work.
44
+ - The maximum number of documents within each batch returned in the indexes list, which applies
45
+ to the ``aggregate`` command. By default, the ``aggregate`` command has an initial batch size of
46
+ ``101`` documents and a maximum size of 16 mebibytes (MiB) for each subsequent batch. This
47
+ option can enforce a smaller limit than 16 MiB, but not a larger
48
+ one. If you set ``batchSize`` to a limit that results in batches larger than
49
+ 16 MiB, this option has no effect.
54
50
55
51
* - codec
56
52
- MongoDB\\Codec\\DocumentCodec
Original file line number Diff line number Diff line change @@ -55,16 +55,16 @@ Parameters
55
55
56
56
* - batchSize
57
57
- integer
58
- - Specifies the batch size for the cursor, which will apply to both the
59
- initial ``aggregate`` command and any subsequent ``getMore`` commands.
60
- This determines the maximum number of documents to return in each
61
- response from the server.
62
-
63
- A batchSize of ``0`` is special in that and will only apply to the
64
- initial ``aggregate`` command; subsequent ``getMore`` commands will use
65
- the server's default batch size. This may be useful for quickly
66
- returning a cursor or failure from ``aggregate`` without doing
67
- significant server-side work.
58
+ - The maximum number of documents within each batch returned in a query result.
59
+ By default, the ``aggregate`` command has an initial batch size of
60
+ ``101`` documents and a maximum size of 16 mebibytes (MiB) for each subsequent batch. This
61
+ option can enforce a smaller limit than 16 MiB, but not a larger
62
+ one. If you set ``batchSize`` to a limit that results in batches larger than
63
+ 16 MiB, this option has no effect.
64
+
65
+ A batchSize of ``0`` means that the cursor will be established, but no documents
66
+ will be returned in the first batch. This may be useful for quickly returning a cursor
67
+ or failure from ``aggregate`` without doing significant server-side work.
68
68
69
69
* - bypassDocumentValidation
70
70
- boolean
You can’t perform that action at this time.
0 commit comments