Skip to content

Commit 0637bba

Browse files
[Backport V6.8] [Backport V6.9] DOCSP-49652 Node CC (#1116)
* DOCSP-44947 TOC Relabel (#923) * DOCSP-44947 TOC Relabel * font: * edit * Mike's suggestion (cherry picked from commit 09afc55) * backport * [Backport V6.9] DOCSP-49652 Node CC (#1115) * DOCSP-44947 TOC Relabel (#923) * DOCSP-44947 TOC Relabel * font: * edit * Mike's suggestion (cherry picked from commit 09afc55) * backport * [Backport v6.14] DOCSP-49652 Backport v6.15 Node CC (#1102) (#1110) (#1112) (#1113) * DOCSP-49652 Backport v6.15 Node CC (#1102) * Backport v6.15 Node CC * first full pass * add usage examples to TOC * save TOC * edits * extra ref edits * redirect fix * monitoring edits * auth and montioring * edits * redirects * edit redirects for all back ports (cherry picked from commit 1067a9b) * generate deploy (cherry picked from commit fc2f38b) (cherry picked from commit 80dd1ff) Co-authored-by: lindseymoore <[email protected]> (cherry picked from commit b63b807) * generate --------- Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> (cherry picked from commit 99dcb69)
1 parent 3ed1125 commit 0637bba

File tree

91 files changed

+2370
-707
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

91 files changed

+2370
-707
lines changed

config/redirects

+69-1
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ raw: ${prefix}/stable -> ${base}/current/
1010
[*-master]: ${prefix}/${version}/fundamentals/versioned-api/ -> ${base}/${version}/fundamentals/stable-api/
1111
[*-master]: ${prefix}/${version}/fundamentals/connection/lambda/ -> ${base}/${version}/fundamentals/connection/
1212
[*-master]: ${prefix}/${version}/fundamentals/csfle -> ${base}/${version}/fundamentals/encrypt-fields/
13+
[*-master]: ${prefix}/${version}/faq/ -> ${base}/${version}/
1314

1415
[*-v5.0]: ${prefix}/${version}/quick-start/connect-to-mongodb/ -> ${base}/${version}/quick-start/
1516
[*-v5.0]: ${prefix}/${version}/quick-start/create-a-connection-string/ -> ${base}/${version}/quick-start/
@@ -23,4 +24,71 @@ raw: ${prefix}/stable -> ${base}/current/
2324
[*-v5.5]: ${prefix}/${version}/fundamentals/run-command/ -> ${base}/${version}/usage-examples/command/
2425
[*-master]: ${prefix}/${version}/fundamentals/crud/write-operations/change-a-document/ -> ${base}/${version}/fundamentals/crud/write-operations/modify/
2526

26-
[*-v6.0): ${prefix}/${version}/fundamentals/connection/socks/ -> ${base}/${version}/
27+
[*-v6.0]: ${prefix}/${version}/fundamentals/connection/socks/ -> ${base}/${version}/
28+
29+
# Comprehensive Coverage Redirects
30+
31+
[v6.5-master]: ${prefix}/${version}/quick-start/download-and-install/ -> ${base}/${version}/get-started/
32+
[v6.5-master]: ${prefix}/${version}/quick-start/create-a-deployment/ -> ${base}/${version}/get-started/
33+
[v6.5-master]: ${prefix}/${version}/quick-start/create-a-connection-string/ -> ${base}/${version}/get-started/
34+
[v6.5-master]: ${prefix}/${version}/quick-start/connect-to-mongodb/ -> ${base}/${version}/get-started/
35+
[v6.5-master]: ${prefix}/${version}/quick-start/next-steps/ -> ${base}/${version}/get-started/
36+
[v6.5-master]: ${prefix}/${version}/fundamentals/connection/ -> ${base}/${version}/connect/
37+
[v6.5-master]: ${prefix}/${version}/fundamentals/connection/connect/ -> ${base}/${version}/connect/mongoclient/
38+
[v6.5-master]: ${prefix}/${version}/fundamentals/connection/connection-options/ -> ${base}/${version}/connect/connection-options/
39+
[v6.5-master]: ${prefix}/${version}/connection-troubleshooting/ -> ${base}/${version}/connect/connection-troubleshooting/
40+
[v6.5-master]: ${prefix}/${version}/fundamentals/connection/network-compression/ -> ${base}/${version}/connect/connection-options/network-compression/
41+
[v6.5-master]: ${prefix}/${version}/fundamentals/connection/csot/ -> ${base}/${version}/connect/connection-options/csot/
42+
[v6.5-master]: ${prefix}/${version}/fundamentals/crud/write-operations/bulk/ -> ${base}/${version}/crud/bulk-write/
43+
[v6.5-master]: ${prefix}/${version}/fundamentals/crud/write-operations/insert/ -> ${base}/${version}/crud/insert/
44+
[v6.5-master]: ${prefix}/${version}/fundamentals/crud/write-operations/upsert/ -> ${base}/${version}/crud/update/
45+
[v6.5-master]: ${prefix}/${version}/fundamentals/crud/write-operations/delete/ -> ${base}/${version}/crud/delete/
46+
[v6.5-master]: ${prefix}/${version}/fundamentals/crud/read-operations/ -> ${base}/${version}/crud/query/
47+
[v6.5-master]: ${prefix}/${version}/fundamentals/crud/query-document/ -> ${base}/${version}/crud/query/query-document/
48+
[v6.5-master]: ${prefix}/${version}/fundamentals/crud/compound-operations/ -> ${base}/${version}/crud/compound-operations/
49+
50+
[v6.5-v6.15]: ${prefix}/${version}/fundamentals/crud/read-write-pref/ ->${base}/${version}/crud/read-write-pref/
51+
52+
[v6.5-master]: ${prefix}/${version}/fundamentals/transactions/ -> ${base}/${version}/crud/transactions/
53+
[v6.5-master]: ${prefix}/${version}/fundamentals/gridfs/ -> ${base}/${version}/crud/gridfs/
54+
[v6.5-master]: ${prefix}/${version}/fundamentals/crud/read-operations/retrieve/ -> ${base}/${version}/crud/query/retrieve/
55+
[v6.5-master]: ${prefix}/${version}/fundamentals/crud/read-operations/project/ -> ${base}/${version}/crud/query/project/
56+
[v6.5-master]: ${prefix}/${version}/fundamentals/crud/read-operations/distinct/ -> ${base}/${version}/crud/query/distinct/
57+
[v6.5-master]: ${prefix}/${version}/fundamentals/crud/read-operations/cursor/ -> ${base}/${version}/crud/query/cursor/
58+
[v6.5-master]: ${prefix}/${version}/fundamentals/crud/read-operations/geo/ -> ${base}/${version}/crud/query/geo/
59+
[v6.5-master]: ${prefix}/${version}/fundamentals/crud/time-series/ -> ${base}/${version}/data-formats/time-series/
60+
[v6.5-master]: ${prefix}/${version}/fundamentals/bson/ -> ${base}/${version}/data-formats/bson/
61+
[v6.5-master]: ${prefix}/${version}/fundamentals/indexes/ -> ${base}/${version}/indexes/
62+
[v6.5-master]: ${prefix}/${version}/fundamentals/run-command/ -> ${base}/${version}/run-command/
63+
[v6.5-master]: ${prefix}/${version}/fundamentals/monitoring/ -> ${base}/${version}/monitoring-and-logging/monitoring/
64+
[v6.5-master]: ${prefix}/${version}/fundamentals/logging/ -> ${base}/${version}/monitoring-and-logging/logging/
65+
[v6.5-master]: ${prefix}/${version}/usage-examples/changeStream -> ${base}/monitoring-and-logging/change-streams/
66+
[v6.5-master]: ${prefix}/${version}/fundamentals/aggregation/ -> ${base}/${version}/aggregation/
67+
[v6.5-master]: ${prefix}/${version}/aggregation-tutorials/ -> ${base}/aggregation/
68+
[v6.5-master]: ${prefix}/${version}/aggregation-tutorials/filtered-subset/ -> ${base}/aggregation/filtered-subset/
69+
[v6.5-master]: ${prefix}/${version}/aggregation-tutorials/group-total/ -> ${base}/aggregation/group-total/
70+
[v6.5-master]: ${prefix}/${version}/aggregation-tutorials/multi-field-join/ -> ${base}/aggregation/multi-field-join/
71+
[v6.5-master]: ${prefix}/${version}/aggregation-tutorials/one-to-one-join/ -> ${base}/aggregation/one-to-one-join/
72+
[v6.5-master]: ${prefix}/${version}/aggregation-tutorials/unpack-arrays/ -> ${base}/aggregation/unpack-arrays/
73+
[v6.5-master]: ${prefix}/${version}/fundamentals/authentication -> ${base}/security/authentication/
74+
75+
[v6.5-v6.15]: ${prefix}/${version}/fundamentals/authentication/mechanisms/ -> ${base}/security/authentication/mechanisms/
76+
77+
[v6.5-v6.15]: ${prefix}/${version}/fundamentals/authentication/enterprise-mechanisms/ -> ${base}/security/authentication/enterprise-mechanisms/
78+
79+
[v6.5-master]: ${prefix}/${version}/fundamentals/encrypt-fields/ -> ${base}/security/encrypt-fields/
80+
[v6.5-master]: ${prefix}/${version}/fundamentals/connection/tls/ -> ${base}/security/tls/
81+
[v6.5-master]: ${prefix}/${version}/fundamentals/connection/socks/ -> ${base}/security/socks/
82+
[v6.5-master]: ${prefix}/${version}/fundamentals/typescript/ -> ${base}/typescript/
83+
[v6.5-master]: ${prefix}/${version}/whats-new/ -> ${base}/reference/release-notes/
84+
[v6.5-master]: ${prefix}/${version}/compatibility/ -> ${base}/reference/compatibility/
85+
[v6.5-master]: ${prefix}/${version}/upgrade/ -> ${base}/reference/upgrade/
86+
[v6.5-master]: ${prefix}/${version}/quick-reference/ -> ${base}/reference/quick-reference/
87+
88+
[v6.5-v6.15]: ${prefix}/${version}/fundamentals/collations/ -> ${base}/crud/collations/
89+
90+
[v6.5-master]: ${prefix}/${version}/fundamentals/crud/read-operations/text/ -> ${base}/crud/query/text/
91+
[v6.5-master]: ${prefix}/${version}/fundamentals/crud/write-operations/modify/ -> ${base}/crud/update/modify/
92+
[v6.5-master]: ${prefix}/${version}/fundamentals/crud/write-operations/embedded-arrays/ -> ${base}/crud/update/embedded-arrays/
93+
[v6.5-master]: ${prefix}/${version}/fundamentals/crud/write-operations/pkFactory/ -> ${base}/crud/pkFactory/
94+
[v6.5-master]: ${prefix}/${version}/fundamentals/promises/ -> ${base}/promises/

snooty.toml

+11-8
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,17 @@ intersphinx = [
77
]
88

99
toc_landing_pages = [
10-
"/fundamentals/authentication",
11-
"/fundamentals",
12-
"/fundamentals/connection",
13-
"/fundamentals/crud",
14-
"/fundamentals/bson",
15-
"/usage-examples",
16-
"/quick-start",
17-
"/aggregation-tutorials",
10+
"/get-started",
11+
"/connect",
12+
"/aggregation",
13+
"/security",
14+
"/security/authentication",
15+
"/data-formats",
16+
"/connect/connection-options",
17+
"/crud",
18+
"/crud/update",
19+
"/crud/transactions",
20+
"/monitoring-and-logging"
1821
]
1922
sharedinclude_root = "https://raw.githubusercontent.com/10gen/docs-shared/main/"
2023

source/aggregation-tutorials.txt

-123
This file was deleted.

source/fundamentals/aggregation.txt renamed to source/aggregation.txt

+113-1
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,24 @@
55
Aggregation
66
===========
77

8+
.. meta::
9+
:description: Learn to use aggregation operations in the MongoDB Node.js Driver to create pipelines for data transformation and summarization.
10+
:keywords: node.js, code example, runnable app
11+
812
.. contents:: On this page
913
:local:
1014
:backlinks: none
1115
:depth: 2
1216
:class: singlecol
1317

18+
.. toctree::
19+
20+
Filtered Subset </aggregation/filtered-subset/>
21+
Group & Total </aggregation/group-total/>
22+
Unpack Arrays & Group </aggregation/unpack-arrays/>
23+
One-to-One Join </aggregation/one-to-one-join/>
24+
Multi-Field Join </aggregation/multi-field-join/>
25+
1426
.. _nodejs-aggregation-overview:
1527

1628
Overview
@@ -98,7 +110,7 @@ database:
98110

99111
.. tip::
100112

101-
For more information on connecting to your MongoDB deployment, see the :doc:`Connection Guide </fundamentals/connection>`.
113+
For more information on connecting to your MongoDB deployment, see the :doc:`Connection Guide </connect>`.
102114

103115
Aggregation Example
104116
~~~~~~~~~~~~~~~~~~~
@@ -131,6 +143,106 @@ This example produces the following output:
131143

132144
For more information, see the `aggregate() API documentation <{+api+}/classes/Collection.html#aggregate>`__.
133145

146+
.. _node-aggregation-tutorials-landing:
147+
.. _node-aggregation-tutorials:
148+
149+
Aggregation Tutorials
150+
---------------------
151+
152+
Aggregation tutorials provide detailed explanations of common
153+
aggregation tasks in a step-by-step format. The tutorials are adapted
154+
from examples in the `Practical MongoDB Aggregations book
155+
<https://www.practical-mongodb-aggregations.com/>`__ by Paul Done.
156+
157+
Each tutorial includes the following sections:
158+
159+
- **Introduction**, which describes the purpose and common use cases of the
160+
aggregation type. This section also describes the example and desired
161+
outcome that the tutorial demonstrates.
162+
163+
- **Before You Get Started**, which describes the necessary databases,
164+
collections, and sample data that you must have before building the
165+
aggregation pipeline and performing the aggregation.
166+
167+
- **Tutorial**, which describes how to build and run the aggregation
168+
pipeline. This section describes each stage of the completed
169+
aggregation tutorial, and then explains how to run and interpret the
170+
output of the aggregation.
171+
172+
At the end of each aggregation tutorial, you can find a link to a fully
173+
runnable Node.js code file that you can run in your environment.
174+
175+
.. tip::
176+
177+
To learn more about performing aggregations, see the
178+
:ref:`node-aggregation` guide.
179+
180+
.. _node-agg-tutorial-template-app:
181+
182+
Aggregation Template App
183+
~~~~~~~~~~~~~~~~~~~~~~~~
184+
185+
Before you begin following an aggregation tutorial, you must set up a
186+
new Node.js app. You can use this app to connect to a MongoDB
187+
deployment, insert sample data into MongoDB, and run the aggregation
188+
pipeline in each tutorial.
189+
190+
.. tip::
191+
192+
To learn how to install the driver and connect to MongoDB,
193+
see the :ref:`node-get-started-download-and-install` and
194+
:ref:`node-get-started-create-deployment` steps of the
195+
Quick Start guide.
196+
197+
Once you install the driver, create a file called
198+
``agg_tutorial.js``. Paste the following code in this file to create an
199+
app template for the aggregation tutorials:
200+
201+
.. literalinclude:: /includes/aggregation/template-app.js
202+
:language: javascript
203+
:copyable: true
204+
205+
.. important::
206+
207+
In the preceding code, read the code comments to find the sections of
208+
the code that you must modify for the tutorial you are following.
209+
210+
If you attempt to run the code without making any changes, you will
211+
encounter a connection error.
212+
213+
For every tutorial, you must replace the connection string placeholder with
214+
your deployment's connection string.
215+
216+
.. tip::
217+
218+
To learn how to locate your deployment's connection string, see the
219+
:ref:`node-get-started-connection-string` step of the Quick Start guide.
220+
221+
For example, if your connection string is
222+
``"mongodb+srv://mongodb-example:27017"``, your connection string assignment resembles
223+
the following:
224+
225+
.. code-block:: javascript
226+
:copyable: false
227+
228+
const uri = "mongodb+srv://mongodb-example:27017";
229+
230+
To run the completed file after you modify the template for a
231+
tutorial, run the following command in your shell:
232+
233+
.. code-block:: bash
234+
235+
node agg_tutorial.js
236+
237+
Available Tutorials
238+
~~~~~~~~~~~~~~~~~~~
239+
240+
- :ref:`node-aggregation-filtered-subset`
241+
- :ref:`node-aggregation-group-total`
242+
- :ref:`node-aggregation-arrays`
243+
- :ref:`node-aggregation-one-to-one`
244+
- :ref:`node-aggregation-multi-field`
245+
134246
Additional Examples
135247
~~~~~~~~~~~~~~~~~~~
136248

0 commit comments

Comments
 (0)