Skip to content

Commit 46e15da

Browse files
DOCSP-31653 Remove duplicate aggregation content (#4200)
* move pages around * remove alphabetical list of stages * remove alphabetical list of operators * change header levels * remove quick reference page * fix broken refs * add missing ref * fix build errors * fix build errors * adjust page title * update toc order * fix ref link * wording * remove superfluous ref * remove superfluous ref * consistency * remove superfluous ref * fix git conflict * edits * fix ref
1 parent 44624f1 commit 46e15da

16 files changed

+79
-2008
lines changed

config/redirects

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2553,3 +2553,6 @@ raw: https://mongodb.github.io/mongo-java-driver/ -> ${base}/drivers/java/sync/c
25532553

25542554
# DOCSP-32407
25552555
[v4.2-*]: ${prefix}/${version}/meta/aggregation-quick-reference/ -> ${base}/${version}/reference/aggregation-quick-reference/
2556+
2557+
# DOCSP-31653
2558+
[v7.0-*]: ${prefix}/${version}/reference/aggregation-quick-reference/ -> ${base}/${version}/reference/aggregation/

source/core/aggregation-pipeline.txt

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ Example output:
160160
- :doc:`/tutorial/aggregation-zip-code-data-set`
161161
- :doc:`/tutorial/update-documents-with-aggregation-pipeline`
162162

163-
.. _aggregation-pipeline-stages:
163+
.. _aggregation-pipeline-stages-details:
164164

165165
Additional Aggregation Pipeline Stage Details
166166
---------------------------------------------
@@ -209,6 +209,22 @@ aggregation expressions in JavaScript.
209209

210210
For all aggregation expressions, see :ref:`aggregation-expressions`.
211211

212+
.. _agg-quick-ref-field-paths:
213+
214+
Field Paths
215+
~~~~~~~~~~~
216+
217+
Aggregation expressions use :term:`field path` to access fields in the
218+
input documents. To specify a field path, prefix the field name or the
219+
:ref:`dotted field name <document-dot-notation>` (if the field is in
220+
the embedded document) with a dollar sign ``$``. For example,
221+
``"$user"`` to specify the field path for the ``user`` field or
222+
``"$user.name"`` to specify the field path to ``"user.name"`` field.
223+
224+
``"$<field>"`` is equivalent to ``"$$CURRENT.<field>"`` where the
225+
:variable:`CURRENT` is a system variable that defaults to the root of
226+
the current object, unless stated otherwise in specific stages.
227+
212228
Run an Aggregation Pipeline
213229
---------------------------
214230

source/core/materialized-views.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ steps:
7070

7171
The aggregation stage transforms the data that you want to save as
7272
a view. To learn more about available aggregation stages, see
73-
:ref:`agg-pipeline-quick-ref`.
73+
:ref:`aggregation-pipeline-operator-reference`.
7474

7575
For this example, add a new field with the :pipeline:`$set` stage:
7676

source/includes/extracts-agg-stages.yaml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -316,14 +316,15 @@ content: |
316316
- Returns information on active and/or dormant operations for
317317
the MongoDB deployment.
318318
319+
* - :pipeline:`$documents`
320+
321+
- Returns literal documents from input values.
322+
319323
* - :pipeline:`$listLocalSessions`
320324
321325
- Lists all active sessions recently in use on the currently
322326
connected :binary:`~bin.mongos` or :binary:`~bin.mongod`
323327
instance. These sessions may have not yet propagated to the
324328
``system.sessions`` collection.
325-
326-
* - :pipeline:`$documents`
327329
328-
- Returns literal documents from input values.
329330
...

source/includes/fact-use-aggregation-not-map-reduce.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ deprecated:
55
:ref:`aggregation pipeline <aggregation-pipeline>`. Aggregation
66
pipelines provide better performance and usability than map-reduce.
77

8-
- You can rewrite map-reduce operations using :ref:`aggregation
9-
pipeline stages <agg-pipeline-quick-ref>`, such as
8+
- You can rewrite map-reduce operations using :ref:`aggregation pipeline
9+
stages <aggregation-pipeline-operator-reference>`, such as
1010
:pipeline:`$group`, :pipeline:`$merge`, and others.
1111

1212
- For map-reduce operations that require custom functionality, you can

0 commit comments

Comments
 (0)