From b41483b4a3180337a7a5d00361e0f5012478504a Mon Sep 17 00:00:00 2001 From: Michael Morisi Date: Mon, 9 Dec 2024 09:24:33 -0500 Subject: [PATCH 1/6] DOCSP-45076: Document that count supports different filters from countDocuments --- snooty.toml | 1 + source/reference/aggregation.txt | 8 ++++++++ 2 files changed, 9 insertions(+) diff --git a/snooty.toml b/snooty.toml index d1765ce71..38b23928e 100644 --- a/snooty.toml +++ b/snooty.toml @@ -2,3 +2,4 @@ name = "ruby-driver" title = "Ruby MongoDB Driver" intersphinx = ["https://www.mongodb.com/docs/manual/objects.inv"] +mdb-server = "MongoDB Server" \ No newline at end of file diff --git a/source/reference/aggregation.txt b/source/reference/aggregation.txt index f9e63f995..a75bbaacd 100644 --- a/source/reference/aggregation.txt +++ b/source/reference/aggregation.txt @@ -98,6 +98,14 @@ find the total number of documents which have the exact array count = coll.count({ 'categories' => [ 'Chinese', 'Seafood' ] }) +.. note:: + + The ``count`` method is not the same as the ``countDocuments`` + method and may not support the same filters. ``countDocuments`` uses the + ``$match`` stage of the aggregation pipeline to filter documents. To learn more + about limitations of the ``$match`` stage, see :manual:`$match Restrictions ` + in the {+mdb-server+} documentation. + Distinct ~~~~~~~~ From 70803077d5463327774c3190e3c029b740d5e9cb Mon Sep 17 00:00:00 2001 From: Michael Morisi Date: Mon, 9 Dec 2024 09:37:05 -0500 Subject: [PATCH 2/6] Test fix --- snooty.toml | 3 +-- source/reference/aggregation.txt | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/snooty.toml b/snooty.toml index 38b23928e..198930334 100644 --- a/snooty.toml +++ b/snooty.toml @@ -1,5 +1,4 @@ name = "ruby-driver" title = "Ruby MongoDB Driver" -intersphinx = ["https://www.mongodb.com/docs/manual/objects.inv"] -mdb-server = "MongoDB Server" \ No newline at end of file +intersphinx = ["https://www.mongodb.com/docs/manual/objects.inv"] \ No newline at end of file diff --git a/source/reference/aggregation.txt b/source/reference/aggregation.txt index a75bbaacd..9f1b182c6 100644 --- a/source/reference/aggregation.txt +++ b/source/reference/aggregation.txt @@ -104,7 +104,7 @@ find the total number of documents which have the exact array method and may not support the same filters. ``countDocuments`` uses the ``$match`` stage of the aggregation pipeline to filter documents. To learn more about limitations of the ``$match`` stage, see :manual:`$match Restrictions ` - in the {+mdb-server+} documentation. + in the MDB Server documentation. Distinct ~~~~~~~~ From defdd4f9ce041488598a31b463c2ed95411e6c7a Mon Sep 17 00:00:00 2001 From: Michael Morisi Date: Mon, 9 Dec 2024 09:43:27 -0500 Subject: [PATCH 3/6] Fix --- snooty.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/snooty.toml b/snooty.toml index 198930334..d1765ce71 100644 --- a/snooty.toml +++ b/snooty.toml @@ -1,4 +1,4 @@ name = "ruby-driver" title = "Ruby MongoDB Driver" -intersphinx = ["https://www.mongodb.com/docs/manual/objects.inv"] \ No newline at end of file +intersphinx = ["https://www.mongodb.com/docs/manual/objects.inv"] From 8aaed18a24de4979fdd11d6a7222b649b1ef69bd Mon Sep 17 00:00:00 2001 From: Michael Morisi Date: Mon, 9 Dec 2024 09:45:55 -0500 Subject: [PATCH 4/6] Try again --- snooty.toml | 1 + source/reference/aggregation.txt | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/snooty.toml b/snooty.toml index d1765ce71..fc127fabe 100644 --- a/snooty.toml +++ b/snooty.toml @@ -1,4 +1,5 @@ name = "ruby-driver" title = "Ruby MongoDB Driver" +mdb-server = "MongoDB Server" intersphinx = ["https://www.mongodb.com/docs/manual/objects.inv"] diff --git a/source/reference/aggregation.txt b/source/reference/aggregation.txt index 9f1b182c6..a75bbaacd 100644 --- a/source/reference/aggregation.txt +++ b/source/reference/aggregation.txt @@ -104,7 +104,7 @@ find the total number of documents which have the exact array method and may not support the same filters. ``countDocuments`` uses the ``$match`` stage of the aggregation pipeline to filter documents. To learn more about limitations of the ``$match`` stage, see :manual:`$match Restrictions ` - in the MDB Server documentation. + in the {+mdb-server+} documentation. Distinct ~~~~~~~~ From 68fbb800e9818039cbcc9ded09946a4396b8f100 Mon Sep 17 00:00:00 2001 From: Michael Morisi Date: Mon, 9 Dec 2024 09:48:00 -0500 Subject: [PATCH 5/6] Never mind --- snooty.toml | 1 - source/reference/aggregation.txt | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/snooty.toml b/snooty.toml index fc127fabe..d1765ce71 100644 --- a/snooty.toml +++ b/snooty.toml @@ -1,5 +1,4 @@ name = "ruby-driver" title = "Ruby MongoDB Driver" -mdb-server = "MongoDB Server" intersphinx = ["https://www.mongodb.com/docs/manual/objects.inv"] diff --git a/source/reference/aggregation.txt b/source/reference/aggregation.txt index a75bbaacd..341a92a5a 100644 --- a/source/reference/aggregation.txt +++ b/source/reference/aggregation.txt @@ -104,7 +104,7 @@ find the total number of documents which have the exact array method and may not support the same filters. ``countDocuments`` uses the ``$match`` stage of the aggregation pipeline to filter documents. To learn more about limitations of the ``$match`` stage, see :manual:`$match Restrictions ` - in the {+mdb-server+} documentation. + in the MongoDB Server documentation. Distinct ~~~~~~~~ From 171eaee6c4ca5728ddb8d2f98d4b4c26d7cbe34a Mon Sep 17 00:00:00 2001 From: Michael Morisi Date: Mon, 9 Dec 2024 10:29:41 -0500 Subject: [PATCH 6/6] NR suggestion --- source/reference/aggregation.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/reference/aggregation.txt b/source/reference/aggregation.txt index 341a92a5a..ee29d5568 100644 --- a/source/reference/aggregation.txt +++ b/source/reference/aggregation.txt @@ -104,7 +104,7 @@ find the total number of documents which have the exact array method and may not support the same filters. ``countDocuments`` uses the ``$match`` stage of the aggregation pipeline to filter documents. To learn more about limitations of the ``$match`` stage, see :manual:`$match Restrictions ` - in the MongoDB Server documentation. + in the MongoDB Server manual. Distinct ~~~~~~~~