diff --git a/source/fundamentals/aggregation.txt b/source/fundamentals/aggregation.txt index 7111af22..f1083f9d 100644 --- a/source/fundamentals/aggregation.txt +++ b/source/fundamentals/aggregation.txt @@ -16,18 +16,33 @@ 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 -transforms the documents into an aggregated result. +Aggregation operations process data in your MongoDB collections and +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. -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. +.. sharedinclude:: dbx/agg-tutorials-manual-tip.rst -The **aggregation pipeline** is the assembly line, **aggregation stages** are the assembly stations, and -**operator expressions** are the specialized tools. + .. replacement:: language + + :guilabel:`{+language+} (Coroutine)` + +Analogy +~~~~~~~ + +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 +specialized tools. Aggregation and Find Operations Compared ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -113,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::