From 54bb7aa7f93203b32351ac17c24784def2d88dc7 Mon Sep 17 00:00:00 2001 From: Angela Date: Fri, 14 Mar 2025 11:56:35 -0400 Subject: [PATCH 1/6] 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/6] 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/6] 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/6] 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/6] 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/6] 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.