@@ -84,9 +84,8 @@ arguments:
8484
8585 - An array of :doc:`aggregation pipeline stages
8686 </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.
9089
9190 * - ``explain``
9291
@@ -308,22 +307,39 @@ For :dbcommand:`aggregate` operation that do not include the
308307
309308.. include:: /includes/extracts/4.2-changes-disconnect.rst
310309
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+
311329Example
312330-------
313331
314- .. versionchanged:: 3.4
315-
316- .. include:: /includes/deprecation-aggregate-wo-cursor.rst
332+ .. include:: /includes/deprecation-aggregate-wo-cursor.rst
317333
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.
323339
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.
327343
328344Aggregate Data with Multi-Stage Pipeline
329345~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
0 commit comments