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 @@ -52,9 +52,14 @@ Parameters
52
52
53
53
* - batchSize
54
54
- integer
55
- - The number of documents to return in the first batch. Defaults to
56
- ``101``. A batchSize of ``0`` means that the cursor will be
57
- established, but no documents will be returned in the first batch.
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 MiB, but not a larger
58
+ one. If you set ``batchSize`` to a limit that results in batches larger than
59
+ 16 MiB, this option has no effect.
60
+
61
+ A batchSize of ``0`` means that the cursor will be established, but no documents
62
+ will be returned in the first batch.
58
63
59
64
Unlike the previous wire protocol version, a batchSize of ``1`` for the
60
65
:dbcommand:`find` command does not close the cursor.
Original file line number Diff line number Diff line change @@ -40,16 +40,12 @@ Parameters
40
40
41
41
* - batchSize
42
42
- integer
43
- - Specifies the batch size for the cursor, which will apply to both the
44
- initial ``aggregate`` command and any subsequent ``getMore`` commands.
45
- This determines the maximum number of documents to return in each
46
- response from the server.
47
-
48
- A batchSize of ``0`` is special in that and will only apply to the
49
- initial ``aggregate`` command; subsequent ``getMore`` commands will use
50
- the server's default batch size. This may be useful for quickly
51
- returning a cursor or failure from ``aggregate`` without doing
52
- significant server-side work.
43
+ - The maximum number of documents within each batch returned in the indexes list, which applies
44
+ to the ``aggregate`` command. By default, the ``aggregate`` command has an initial batch size of
45
+ ``101`` documents and a maximum size of 16 mebibytes (MiB) for each subsequent batch. This
46
+ option can enforce a smaller limit than 16 MiB, but not a larger
47
+ one. If you set ``batchSize`` to a limit that results in batches larger than
48
+ 16 MiB, this option has no effect.
53
49
54
50
* - codec
55
51
- 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