From 54bb7aa7f93203b32351ac17c24784def2d88dc7 Mon Sep 17 00:00:00 2001 From: Angela Date: Fri, 14 Mar 2025 11:56:35 -0400 Subject: [PATCH 1/9] change batchsize description --- source/reference/methods.txt | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/source/reference/methods.txt b/source/reference/methods.txt index cfc8dc53..32ff32a2 100644 --- a/source/reference/methods.txt +++ b/source/reference/methods.txt @@ -497,8 +497,15 @@ Cursor Methods .. arrayAccess * - :method:`cursor.batchSize()` - - Controls the number of documents MongoDB will return to the - client in a single network message. + - Specifies the maximum number of documents MongoDB will return to the client + within each batch returned in a query result. By default, the initial batch + size is ``101`` documents and subsequent batches have a maximum + size of 16 mebibytes (MiB). This option can enforce a smaller + limit than 16 MiB, but not a larger one. If you set ``batchSize`` + to a limit that results in batches larger than 16 MiB, this option has no effect. + + A batchSize of 0 means that the cursor will be established, but no documents + will be returned in the first batch. The following example query returns results in batches of 100: From e2b0108803220dd62add0cbe4c0f866cf33d0f8e Mon Sep 17 00:00:00 2001 From: Angela Date: Fri, 14 Mar 2025 15:20:59 -0400 Subject: [PATCH 2/9] address feedback --- source/reference/methods.txt | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/source/reference/methods.txt b/source/reference/methods.txt index 32ff32a2..f6f7a205 100644 --- a/source/reference/methods.txt +++ b/source/reference/methods.txt @@ -498,14 +498,14 @@ Cursor Methods * - :method:`cursor.batchSize()` - Specifies the maximum number of documents MongoDB will return to the client - within each batch returned in a query result. By default, the initial batch + within each batch returned in a query result. By default, the initial batchx size is ``101`` documents and subsequent batches have a maximum size of 16 mebibytes (MiB). This option can enforce a smaller limit than 16 MiB, but not a larger one. If you set ``batchSize`` - to a limit that results in batches larger than 16 MiB, this option has no effect. + to a limit that results in batches larger than 16 MiB, this option has no effect and :method:`~cursor.batchSize()` uses the default batch size.. - A batchSize of 0 means that the cursor will be established, but no documents - will be returned in the first batch. + A ``batchSize`` of ``0`` means that the cursor is established, but no documents + are returned in the first batch. The following example query returns results in batches of 100: From ff14d5a0791d03a94809e0b0f992969a9e0110ac Mon Sep 17 00:00:00 2001 From: Angela Date: Fri, 14 Mar 2025 15:24:37 -0400 Subject: [PATCH 3/9] remove period --- source/reference/methods.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/reference/methods.txt b/source/reference/methods.txt index f6f7a205..d6f8763a 100644 --- a/source/reference/methods.txt +++ b/source/reference/methods.txt @@ -502,7 +502,7 @@ Cursor Methods size is ``101`` documents and subsequent batches have a maximum size of 16 mebibytes (MiB). This option can enforce a smaller limit than 16 MiB, but not a larger one. If you set ``batchSize`` - to a limit that results in batches larger than 16 MiB, this option has no effect and :method:`~cursor.batchSize()` uses the default batch size.. + to a limit that results in batches larger than 16 MiB, this option has no effect and :method:`~cursor.batchSize()` uses the default batch size. A ``batchSize`` of ``0`` means that the cursor is established, but no documents are returned in the first batch. From 7ffadcdd86f6c4eace7c521b0854ec2ce1155425 Mon Sep 17 00:00:00 2001 From: Angela Date: Fri, 14 Mar 2025 15:24:56 -0400 Subject: [PATCH 4/9] remove typo --- source/reference/methods.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/reference/methods.txt b/source/reference/methods.txt index d6f8763a..1042fc15 100644 --- a/source/reference/methods.txt +++ b/source/reference/methods.txt @@ -498,7 +498,7 @@ Cursor Methods * - :method:`cursor.batchSize()` - Specifies the maximum number of documents MongoDB will return to the client - within each batch returned in a query result. By default, the initial batchx + within each batch returned in a query result. By default, the initial batch size is ``101`` documents and subsequent batches have a maximum size of 16 mebibytes (MiB). This option can enforce a smaller limit than 16 MiB, but not a larger one. If you set ``batchSize`` From 4c11fab67d59038d8ac1c8dba3661ca5bdca648e Mon Sep 17 00:00:00 2001 From: Angela Date: Fri, 14 Mar 2025 16:51:34 -0400 Subject: [PATCH 5/9] fix wrap --- source/reference/methods.txt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/source/reference/methods.txt b/source/reference/methods.txt index 1042fc15..644d3cd2 100644 --- a/source/reference/methods.txt +++ b/source/reference/methods.txt @@ -502,7 +502,9 @@ Cursor Methods size is ``101`` documents and subsequent batches have a maximum size of 16 mebibytes (MiB). This option can enforce a smaller limit than 16 MiB, but not a larger one. If you set ``batchSize`` - to a limit that results in batches larger than 16 MiB, this option has no effect and :method:`~cursor.batchSize()` uses the default batch size. + to a limit that results in batches larger than 16 MiB, this option + has no effect and :method:`~cursor.batchSize()` uses the default + batch size. A ``batchSize`` of ``0`` means that the cursor is established, but no documents are returned in the first batch. From 3b21613ddc25aafbd20ffe27ab5ddb8246c3ba39 Mon Sep 17 00:00:00 2001 From: Angela Date: Fri, 14 Mar 2025 16:55:27 -0400 Subject: [PATCH 6/9] wrap --- source/reference/methods.txt | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/source/reference/methods.txt b/source/reference/methods.txt index 644d3cd2..65c250cf 100644 --- a/source/reference/methods.txt +++ b/source/reference/methods.txt @@ -497,11 +497,11 @@ Cursor Methods .. arrayAccess * - :method:`cursor.batchSize()` - - Specifies the maximum number of documents MongoDB will return to the client - within each batch returned in a query result. By default, the initial batch - size is ``101`` documents and subsequent batches have a maximum - size of 16 mebibytes (MiB). This option can enforce a smaller - limit than 16 MiB, but not a larger one. If you set ``batchSize`` + - Specifies the maximum number of documents MongoDB will return to the + client within each batch returned in a query result. By default, + the initial batch size is ``101`` documents and subsequent batches + have a maximum size of 16 mebibytes (MiB). This option can enforce a + smaller limit than 16 MiB, but not a larger one. If you set ``batchSize`` to a limit that results in batches larger than 16 MiB, this option has no effect and :method:`~cursor.batchSize()` uses the default batch size. From f538eb78e823d8ee67d04943206ad127a537362e Mon Sep 17 00:00:00 2001 From: Angela Date: Thu, 3 Apr 2025 17:53:20 -0400 Subject: [PATCH 7/9] ch feedback --- source/reference/methods.txt | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/source/reference/methods.txt b/source/reference/methods.txt index 65c250cf..d38e2d08 100644 --- a/source/reference/methods.txt +++ b/source/reference/methods.txt @@ -497,14 +497,14 @@ Cursor Methods .. arrayAccess * - :method:`cursor.batchSize()` - - Specifies the maximum number of documents MongoDB will return to the - client within each batch returned in a query result. By default, - the initial batch size is ``101`` documents and subsequent batches - have a maximum size of 16 mebibytes (MiB). This option can enforce a - smaller limit than 16 MiB, but not a larger one. If you set ``batchSize`` - to a limit that results in batches larger than 16 MiB, this option - has no effect and :method:`~cursor.batchSize()` uses the default - batch size. + - Specifies the maximum number of documents MongoDB can return to the + client within each batch returned in a query result. By default, the initial batch + size is the lesser of ``101`` documents or 16 mebibytes (MiB) worth of documents. + Subsequent batches have a maximum size of 16 MiB. This option can enforce a smaller + limit than 16 MiB, but not a larger one. If you set ``batchSize`` to a limit that + results in batches larger than 16 MiB, this option has no effect and + :method:`~cursor.batchSize()` uses the default batch size of the lesser of ``101`` + documents or 16 mebibytes (MiB) worth of documents. A ``batchSize`` of ``0`` means that the cursor is established, but no documents are returned in the first batch. From 6d851eb0013271bf6ae1cd3f1ca80b31956a7a9b Mon Sep 17 00:00:00 2001 From: Angela Date: Tue, 8 Apr 2025 12:08:29 -0400 Subject: [PATCH 8/9] ch feedback --- source/reference/methods.txt | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/source/reference/methods.txt b/source/reference/methods.txt index d38e2d08..bad82e44 100644 --- a/source/reference/methods.txt +++ b/source/reference/methods.txt @@ -501,10 +501,9 @@ Cursor Methods client within each batch returned in a query result. By default, the initial batch size is the lesser of ``101`` documents or 16 mebibytes (MiB) worth of documents. Subsequent batches have a maximum size of 16 MiB. This option can enforce a smaller - limit than 16 MiB, but not a larger one. If you set ``batchSize`` to a limit that - results in batches larger than 16 MiB, this option has no effect and - :method:`~cursor.batchSize()` uses the default batch size of the lesser of ``101`` - documents or 16 mebibytes (MiB) worth of documents. + limit than 16 MiB, but not a larger one. When set, the + ``batchSize`` is the lesser of ``batchSize`` documents or 16 MiB worth of + documents. A ``batchSize`` of ``0`` means that the cursor is established, but no documents are returned in the first batch. From fa0495db5931f7331870b8d8befa8a05694710c4 Mon Sep 17 00:00:00 2001 From: Angela Date: Tue, 8 Apr 2025 12:18:09 -0400 Subject: [PATCH 9/9] fix spacing --- source/reference/methods.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/reference/methods.txt b/source/reference/methods.txt index bad82e44..374f1ee9 100644 --- a/source/reference/methods.txt +++ b/source/reference/methods.txt @@ -503,7 +503,7 @@ Cursor Methods Subsequent batches have a maximum size of 16 MiB. This option can enforce a smaller limit than 16 MiB, but not a larger one. When set, the ``batchSize`` is the lesser of ``batchSize`` documents or 16 MiB worth of - documents. + documents. A ``batchSize`` of ``0`` means that the cursor is established, but no documents are returned in the first batch.