From 985df3e4c12683e7681cd0f3e2dc9d37bf42307a Mon Sep 17 00:00:00 2001 From: rustagir Date: Tue, 17 Jun 2025 15:27:08 -0400 Subject: [PATCH 1/3] DOCSP-50751: agg tutorial link --- source/fundamentals/aggregation.txt | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/source/fundamentals/aggregation.txt b/source/fundamentals/aggregation.txt index 7111af22..be863c73 100644 --- a/source/fundamentals/aggregation.txt +++ b/source/fundamentals/aggregation.txt @@ -16,7 +16,7 @@ Aggregation Overview -------- -In this guide, you can learn how to use **aggregation operations** in the MongoDB Kotlin driver. +In this guide, you can learn how to use **aggregation operations** in the {+driver-short+}. Aggregation operations process data in your MongoDB collections and return computed results. MongoDB's Aggregation pipeline, part of the Query API, is modeled on the concept of data processing pipelines. Documents enter a multi-staged pipeline that @@ -29,6 +29,14 @@ which are then transformed and assembled into a finished product. The **aggregation pipeline** is the assembly line, **aggregation stages** are the assembly stations, and **operator expressions** are the specialized tools. +This guide provides examples on how to use aggregation pipelines. + +.. sharedinclude:: dbx/agg-tutorials-manual-tip.rst + + .. replacement:: language + + :guilabel:`{+language+} (Coroutine)` + Aggregation and Find Operations Compared ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ From da07c48770566030e56418b9713e5484e7fb135e Mon Sep 17 00:00:00 2001 From: rustagir Date: Tue, 17 Jun 2025 15:59:04 -0400 Subject: [PATCH 2/3] wip --- source/fundamentals/aggregation.txt | 33 +++++++++++++++++------------ 1 file changed, 20 insertions(+), 13 deletions(-) diff --git a/source/fundamentals/aggregation.txt b/source/fundamentals/aggregation.txt index be863c73..97a2d9c5 100644 --- a/source/fundamentals/aggregation.txt +++ b/source/fundamentals/aggregation.txt @@ -16,20 +16,14 @@ Aggregation Overview -------- -In this guide, you can learn how to use **aggregation operations** in the {+driver-short+}. +In this guide, you can learn how to use **aggregation operations** in +the {+driver-short+}. -Aggregation operations process data in your MongoDB collections and return computed results. MongoDB's Aggregation -pipeline, part of the Query API, is modeled on the concept of data processing pipelines. Documents enter a multi-staged pipeline that -transforms the documents into an aggregated result. - -Another way to think of aggregation is like a car factory. Within the car factory is an assembly line, along which -are assembly stations with specialized tools to do a specific job, like drills and welders. Raw parts enter the factory, -which are then transformed and assembled into a finished product. - -The **aggregation pipeline** is the assembly line, **aggregation stages** are the assembly stations, and -**operator expressions** are the specialized tools. - -This guide provides examples on how to use aggregation pipelines. +Aggregation operations process data in your MongoDB collections and +return computed results. MongoDB's Aggregation pipeline, part of the +Query API, is modeled on the concept of data processing pipelines. +Documents enter a multi-staged pipeline that transforms the documents +into an aggregated result. .. sharedinclude:: dbx/agg-tutorials-manual-tip.rst @@ -37,6 +31,19 @@ This guide provides examples on how to use aggregation pipelines. :guilabel:`{+language+} (Coroutine)` +Analogy +~~~~~~~ + +Another way to think of aggregation is like a car factory. Within the +car factory is an assembly line, along which are assembly stations with +specialized tools to do a specific job, like drills and welders. Raw +parts enter the factory, which are then transformed and assembled into a +finished product. + +The **aggregation pipeline** is the assembly line, **aggregation +stages** are the assembly stations, and **operator expressions** are the +specialized tools. + Aggregation and Find Operations Compared ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ From 70371ceb119af954eacf947889a2a5fc381de2df Mon Sep 17 00:00:00 2001 From: rustagir Date: Mon, 23 Jun 2025 11:24:40 -0400 Subject: [PATCH 3/3] MW PR fixes 1 --- source/fundamentals/aggregation.txt | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/source/fundamentals/aggregation.txt b/source/fundamentals/aggregation.txt index 97a2d9c5..f1083f9d 100644 --- a/source/fundamentals/aggregation.txt +++ b/source/fundamentals/aggregation.txt @@ -20,9 +20,9 @@ In this guide, you can learn how to use **aggregation operations** in the {+driver-short+}. Aggregation operations process data in your MongoDB collections and -return computed results. MongoDB's Aggregation pipeline, part of the -Query API, is modeled on the concept of data processing pipelines. -Documents enter a multi-staged pipeline that transforms the documents +return computed results. MongoDB's aggregation pipeline, which is part of the +Query API, is modeled on the concept of data-processing pipelines. +Documents enter a multi-stage pipeline that transforms the documents into an aggregated result. .. sharedinclude:: dbx/agg-tutorials-manual-tip.rst @@ -34,11 +34,11 @@ into an aggregated result. Analogy ~~~~~~~ -Another way to think of aggregation is like a car factory. Within the -car factory is an assembly line, along which are assembly stations with -specialized tools to do a specific job, like drills and welders. Raw -parts enter the factory, which are then transformed and assembled into a -finished product. +The functionality of an aggregation is similar to what occurs in a car +factory. Within the car factory is an assembly line, along which are +assembly stations with specialized tools to do a specific job, like +drills and welders. Raw parts enter the factory, and the factory +transforms them and assembles them into a finished product. The **aggregation pipeline** is the assembly line, **aggregation stages** are the assembly stations, and **operator expressions** are the @@ -128,9 +128,10 @@ In the following example, the aggregation pipeline: - Uses a :manual:`$group ` stage to group the matching documents by the ``stars`` field, accumulating a count of documents for each distinct value of ``stars``. -.. seealso:: +.. tip:: - You can build the expressions used in this example using the :ref:`aggregation builders `. + You can build the expressions used in this example by using the + :ref:`aggregation builders `. .. io-code-block::