@@ -85,9 +85,8 @@ arguments:
8585
8686 - An array of :doc:`aggregation pipeline stages
8787 </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.
9190
9291 * - ``explain``
9392
@@ -309,22 +308,39 @@ For :dbcommand:`aggregate` operation that do not include the
309308
310309.. include:: /includes/extracts/4.2-changes-disconnect.rst
311310
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+
312330Example
313331-------
314332
315- .. versionchanged:: 3.4
316-
317- .. include:: /includes/deprecation-aggregate-wo-cursor.rst
333+ .. include:: /includes/deprecation-aggregate-wo-cursor.rst
318334
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.
324340
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.
328344
329345Aggregate Data with Multi-Stage Pipeline
330346~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
0 commit comments