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