Skip to content

Commit a7bd71c

Browse files
committed
clarify wording based on rr feedback
1 parent 6f46523 commit a7bd71c

File tree

5 files changed

+30
-31
lines changed

5 files changed

+30
-31
lines changed

source/includes/extracts-watch-option.yaml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
ref: watch-option-batchSize
22
content: |
3-
4-
Specifies the batch size for the cursor, which will apply to both the
5-
initial ``aggregate`` command and any subsequent ``getMore`` commands.
6-
If batchSize is set, ``aggregate`` and any subsequent ``getMore`` commands returns the smaller of 16 megabytes of data
7-
or batchSize documents. Operations of type ``find``, ``aggregate``, ``listIndexes``, and ``listCollections`` return a maximum of ``16`` megabytes per batch.
8-
batchSize can enforce a smaller limit than ``16`` megabytes, but not a larger one.
3+
The maximum number of documents within each batch returned in a query result. By default,
4+
the ``find()`` method has an initial batch size of ``101`` documents
5+
and a maximum of 16 megabytes for each subsequent batch. This
6+
option can enforce a smaller limit than 16 megabytes, but not a larger
7+
one. If you set ``batchSize`` to a limit that results in batches larger than
8+
16 MB, this option has no effect.
99
1010
Irrespective of the ``batchSize`` option, the initial ``aggregate`` command
1111
response for a change stream generally does not include any documents

source/read/retrieve.txt

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -180,9 +180,12 @@ you can set in the array:
180180
- Description
181181

182182
* - ``batchSize``
183-
- | The limit for each batch returned in a query result. The ``find`` method has an initial batch size of ``101`` documents by default and returns a maximum of 16
184-
megabytes per batch. Subsequent ``getMore`` operations issued against the resulting cursor have no default batch size,
185-
so they are limited only by the ``16`` megabyte message size. batchSize can enforce a smaller limit than ``16`` megabytes, but not a larger one.
183+
- | The maximum number of documents within each batch returned in a query result. By default,
184+
the ``find()`` method has an initial batch size of ``101`` documents
185+
and a maximum of 16 megabytes for each subsequent batch. This
186+
option can enforce a smaller limit than 16 megabytes, but not a larger
187+
one. If you set ``batchSize`` to a limit that results in batches larger than
188+
16 MB, this option has no effect.
186189
| **Type**: ``integer``
187190

188191
* - ``collation``

source/reference/method/MongoDBCollection-find.txt

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -52,9 +52,12 @@ Parameters
5252

5353
* - batchSize
5454
- integer
55-
- Sets the number of documents to return in the first batch if the number of documents to return is over ``101``.
56-
Defaults to ``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,
56+
the ``find()`` method has an initial batch size of ``101`` documents
57+
and a maximum of 16 megabytes for each subsequent batch. This
58+
option can enforce a smaller limit than 16 megabytes, but not a larger
59+
one. If you set ``batchSize`` to a limit that results in batches larger than
60+
16 MB, this option has no effect.
5861

5962
Unlike the previous wire protocol version, a batchSize of ``1`` for the
6063
:dbcommand:`find` command does not close the cursor.

source/reference/method/MongoDBCollection-listSearchIndexes.txt

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -40,13 +40,12 @@ Parameters
4040

4141
* - batchSize
4242
- integer
43-
- Specifies the batch size for the cursor, which will apply to both thex
44-
initial ``aggregate`` command and any subsequent ``getMore`` commands.
45-
If batchSize is set, ``aggregate`` and any subsequent ``getMore`` commands returns the smaller of ``16`` megabytes of data
46-
or batchSize documents. Operations of type ``find``, ``aggregate``, ``listIndexes``, and ``listCollections`` return a maximum of ``16`` megabytes per batch.
47-
batchSize can enforce a smaller limit than ``16`` megabytes, but not a larger one.
48-
49-
If batchSize is not set, ``aggregate`` and ``getMore`` commands return up to ``16`` megabytes of data.
43+
- The maximum number of documents within each batch returned in a query result. By default,
44+
the ``find()`` method has an initial batch size of ``101`` documents
45+
and a maximum of 16 megabytes for each subsequent batch. This
46+
option can enforce a smaller limit than 16 megabytes, but not a larger
47+
one. If you set ``batchSize`` to a limit that results in batches larger than
48+
16 MB, this option has no effect.
5049

5150
A batchSize of ``0`` is special in that and will only apply to the
5251
initial ``aggregate`` command; subsequent ``getMore`` commands will use

source/reference/method/MongoDBDatabase-aggregate.txt

Lines changed: 6 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -54,19 +54,13 @@ Parameters
5454

5555
* - batchSize
5656
- integer
57-
- Specifies the batch size for the cursor, which will apply to both the
58-
initial ``aggregate`` command and any subsequent ``getMore`` commands.
57+
- The maximum number of documents within each batch returned in a query result. By default,
58+
the ``find()`` method has an initial batch size of ``101`` documents
59+
and a maximum of 16 megabytes for each subsequent batch. This
60+
option can enforce a smaller limit than 16 megabytes, but not a larger
61+
one. If you set ``batchSize`` to a limit that results in batches larger than
62+
16 MB, this option has no effect.
5963

60-
The ``aggregate`` command has an initial batch size of 101 documents by default.
61-
Subsequent ``getMore`` operations issued against the resulting cursor have no default batch size,
62-
so they are limited only by the ``16`` megabyte message size.
63-
64-
If batchSize is set, ``aggregate`` and any subsequent ``getMore`` commands returns the smaller of 16 megabytes of data
65-
or batchSize documents. Operations of type ``aggregate`` return a maximum of ``16`` megabytes per batch.
66-
batchSize can enforce a smaller limit than ``16`` megabytes, but not a larger one.
67-
68-
If batchSize is not set, ``aggregate`` and ``getMore`` commands return up to ``16`` megabytes of data.
69-
7064
A batchSize of ``0`` is special in that and will only apply to the
7165
initial ``aggregate`` command; subsequent ``getMore`` commands will use
7266
the server's default batch size. This may be useful for quickly

0 commit comments

Comments
 (0)