@@ -12,7 +12,7 @@ Aggregation Pipeline Builder
12
12
:depth: 1
13
13
:class: singlecol
14
14
15
- *New in version 1.14.0*
15
+ *New in version 1.14.0. *
16
16
17
17
The Aggregation Pipeline Builder in |compass| lets you create
18
18
:manual:`aggregation pipelines </core/aggregation-pipeline/>` to process
@@ -94,6 +94,10 @@ Create an Aggregation Pipeline
94
94
- Stage View Mode, a visual pipeline editor that preloads pipeline syntax based
95
95
on your selected stages.
96
96
97
+ - Stage Wizard, a feature of Stage View Mode that provides a set of templates
98
+ for simple aggregation stage use cases. The Stage Wizard only includes simple
99
+ use cases to help you get started with your aggregation pipeline.
100
+
97
101
- Focus Mode, a feature of Stage View Mode where you edit one pipeline stage at
98
102
a time. Focus Mode helps you manage complex or deeply nested aggregation
99
103
pipeline stages.
@@ -172,6 +176,90 @@ your chosen view mode:
172
176
173
177
|compass-short| returns your results in the document view.
174
178
179
+ .. tab:: Stage Wizard
180
+ :tabid: wizard
181
+
182
+ .. procedure::
183
+ :style: normal
184
+
185
+ .. step:: Select the :guilabel:`Stages` view.
186
+
187
+ In the aggregation pipeline pane, ensure the
188
+ :guilabel:`{} Stages` toggle switch is selected.
189
+
190
+ .. figure:: /images/compass/agg-builder-stageview-toggle-on.png
191
+ :figwidth: 300 px
192
+ :alt: Toggle on stage view mode
193
+
194
+ .. step:: Open the :guilabel:`Stage Wizard` card.
195
+
196
+ To the right of the view mode toggle, click the :guilabel:`Wizard`
197
+ icon to open the :guilabel:`Stage Wizard` card.
198
+
199
+ .. figure:: /images/compass/agg-builder-stage-wizard.png
200
+ :figwidth: 300 px
201
+ :alt: Click the icon to the right of the view mode toggle.
202
+
203
+ .. step:: (Optional) Search for an aggregation use case.
204
+
205
+ On the :guilabel:`Stage Wizard` card, you can filter the
206
+ use cases by searching for keywords associated with the use case or
207
+ aggregation stage.
208
+
209
+ .. step:: Select an aggregation pipeline stage use case.
210
+
211
+ On the :guilabel:`Stage Wizard` card, select a stage use
212
+ case for the first stage of your pipeline. You can click the stage
213
+ card to add it to the end of your pipeline or drag it to your
214
+ preferred position.
215
+
216
+ After you select a use case, |compass-short| populates the stage
217
+ card with a form that corresponds to the selected aggregation
218
+ pipeline stage.
219
+
220
+ The Stage Wizard use cases include the following aggregation stages:
221
+
222
+ - :pipeline:`$group`
223
+
224
+ - :pipeline:`$lookup`
225
+
226
+ - :pipeline:`$match`
227
+
228
+ - :pipeline:`$project`
229
+
230
+ - :pipeline:`$sort`
231
+
232
+ .. step:: Fill in your pipeline stage.
233
+
234
+ Fill in the form for your selected stage and click
235
+ :guilabel:`Apply`. After you click :guilabel:`Apply`, the form will
236
+ turn into a stage card that you can edit in Stage View Mode, Focus
237
+ Mode, or Text View Mode.
238
+
239
+ |compass-short| populates the Stage Output with up to ten sample
240
+ output documents.
241
+
242
+ .. note::
243
+
244
+ You cannot edit an existing stage through the Stage Wizard. The
245
+ Stage Wizard can only add new stages. To edit an existing stage,
246
+ use Stage View Mode, Focus Mode, or Text View Mode.
247
+
248
+ .. step:: Add additional pipeline stages.
249
+
250
+ To add more aggregation stages to your pipeline, repeat steps 3
251
+ and 4 for each additional stage.
252
+
253
+ .. tip::
254
+ You can change the order of pipeline stages by dragging the
255
+ header of each stage card.
256
+
257
+ .. step:: Run the pipeline.
258
+
259
+ At the top-right corner of the pipeline builder, click
260
+ :guilabel:`Run`. |compass-short| returns your results in the
261
+ document view.
262
+
175
263
.. tab:: Focus Mode
176
264
:tabid: focus
177
265
@@ -550,7 +638,7 @@ To update the :guilabel:`count results`:
550
638
.. procedure::
551
639
:style: normal
552
640
553
- .. step:: ** (Optional)** If the results have not been counted, click
641
+ .. step:: (Optional) If the results have not been counted, click
554
642
the :guilabel:`count results` link.
555
643
556
644
.. figure:: /images/compass/agg-builder-click-count-results.png
0 commit comments