@@ -85,9 +85,8 @@ arguments:
85
85
86
86
- An array of :doc:`aggregation pipeline stages
87
87
</reference/operator/aggregation-pipeline>` that process and
88
- transform the document stream as part of the aggregation pipeline.
89
-
90
-
88
+ transform the document stream as part of the aggregation
89
+ pipeline.
91
90
92
91
* - ``explain``
93
92
@@ -309,22 +308,39 @@ For :dbcommand:`aggregate` operation that do not include the
309
308
310
309
.. include:: /includes/extracts/4.2-changes-disconnect.rst
311
310
311
+ Versioned API
312
+ -------------
313
+
314
+ When using :ref:`Versioned API <versioned-api>` V1:
315
+
316
+ - You cannot use the following stages in an :dbcommand:`aggregate`
317
+ command:
318
+
319
+ - :pipeline:`$currentOp`
320
+ - :pipeline:`$indexStats`
321
+ - :pipeline:`$listLocalSessions`
322
+ - :pipeline:`$listSessions`
323
+ - :pipeline:`$planCacheStats`
324
+ - :pipeline:`$search`
325
+
326
+ - When using the :pipeline:`$collStats` stage, you can only use the
327
+ ``count`` field. No other :pipeline:`$collStats` fields are
328
+ available.
329
+
312
330
Example
313
331
-------
314
332
315
- .. versionchanged:: 3.4
316
-
317
- .. include:: /includes/deprecation-aggregate-wo-cursor.rst
333
+ .. include:: /includes/deprecation-aggregate-wo-cursor.rst
318
334
319
- Rather than run the :dbcommand:`aggregate` command directly, most
320
- users should use the :method:`db.collection.aggregate()` helper
321
- provided in :binary:`~bin.mongosh` or the equivalent helper in
322
- their driver. In 2.6 and later, the
323
- :method:`db.collection.aggregate()` helper always returns a cursor.
335
+ Rather than run the :dbcommand:`aggregate` command directly, most
336
+ users should use the :method:`db.collection.aggregate()` helper
337
+ provided in :binary:`~bin.mongosh` or the equivalent helper in
338
+ their driver. In 2.6 and later, the
339
+ :method:`db.collection.aggregate()` helper always returns a cursor.
324
340
325
- Except for the first two examples which demonstrate the command
326
- syntax, the examples in this page use the
327
- :method:`db.collection.aggregate()` helper.
341
+ Except for the first two examples which demonstrate the command
342
+ syntax, the examples in this page use the
343
+ :method:`db.collection.aggregate()` helper.
328
344
329
345
Aggregate Data with Multi-Stage Pipeline
330
346
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
0 commit comments