diff --git a/source/core/capped-collections.txt b/source/core/capped-collections.txt index 79e88ec5ae8..f258975c104 100644 --- a/source/core/capped-collections.txt +++ b/source/core/capped-collections.txt @@ -139,6 +139,12 @@ Transactions .. include:: /includes/extracts/transactions-capped-collection-change.rst +Versioned API +~~~~~~~~~~~~~ + +Capped collections are not supported in :ref:`Versioned API +` V1. + Procedures ---------- diff --git a/source/reference/command/aggregate.txt b/source/reference/command/aggregate.txt index 148961aab3d..f8b98c5f7d5 100644 --- a/source/reference/command/aggregate.txt +++ b/source/reference/command/aggregate.txt @@ -84,9 +84,8 @@ arguments: - An array of :doc:`aggregation pipeline stages ` that process and - transform the document stream as part of the aggregation pipeline. - - + transform the document stream as part of the aggregation + pipeline. * - ``explain`` @@ -308,22 +307,39 @@ For :dbcommand:`aggregate` operation that do not include the .. include:: /includes/extracts/4.2-changes-disconnect.rst +Versioned API +------------- + +When using :ref:`Versioned API ` V1: + +- You cannot use the following stages in an :dbcommand:`aggregate` + command: + + - :pipeline:`$currentOp` + - :pipeline:`$indexStats` + - :pipeline:`$listLocalSessions` + - :pipeline:`$listSessions` + - :pipeline:`$planCacheStats` + - :pipeline:`$search` + +- When using the :pipeline:`$collStats` stage, you can only use the + ``count`` field. No other :pipeline:`$collStats` fields are + available. + Example ------- -.. versionchanged:: 3.4 - - .. include:: /includes/deprecation-aggregate-wo-cursor.rst +.. include:: /includes/deprecation-aggregate-wo-cursor.rst - Rather than run the :dbcommand:`aggregate` command directly, most - users should use the :method:`db.collection.aggregate()` helper - provided in :binary:`~bin.mongosh` or the equivalent helper in - their driver. In 2.6 and later, the - :method:`db.collection.aggregate()` helper always returns a cursor. +Rather than run the :dbcommand:`aggregate` command directly, most +users should use the :method:`db.collection.aggregate()` helper +provided in :binary:`~bin.mongosh` or the equivalent helper in +their driver. In 2.6 and later, the +:method:`db.collection.aggregate()` helper always returns a cursor. - Except for the first two examples which demonstrate the command - syntax, the examples in this page use the - :method:`db.collection.aggregate()` helper. +Except for the first two examples which demonstrate the command +syntax, the examples in this page use the +:method:`db.collection.aggregate()` helper. Aggregate Data with Multi-Stage Pipeline ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/source/reference/command/create.txt b/source/reference/command/create.txt index 5e00dda6fce..edf0958251c 100644 --- a/source/reference/command/create.txt +++ b/source/reference/command/create.txt @@ -400,6 +400,21 @@ Transactions .. |operation| replace:: :dbcommand:`create` +Versioned API +~~~~~~~~~~~~~ + +.. versionchanged:: 5.0 + +When using :ref:`Versioned API ` V1, you cannot specify +the following fields in a :dbcommand:`create` command: + +- ``autoIndexId`` +- ``capped`` +- ``indexOptionDefaults`` +- ``max`` +- ``size`` +- ``storageEngine`` + Access Control -------------- diff --git a/source/reference/command/createIndexes.txt b/source/reference/command/createIndexes.txt index 9941ad5a757..5a18230b5cd 100644 --- a/source/reference/command/createIndexes.txt +++ b/source/reference/command/createIndexes.txt @@ -594,6 +594,21 @@ Collation and Index Types .. include:: /includes/extracts/collation-index-type-restrictions-addendum.rst +Versioned API +~~~~~~~~~~~~~ + +When using :ref:`Versioned API ` V1: + +- You cannot specify any of the following fields in the ``indexes`` array: + + - ``background`` + - ``bucketSize`` + - ``sparse`` + - ``storageEngine`` + +- You cannot create :ref:`geoHaystack ` or + :ref:`text ` indexes. + Behavior -------- diff --git a/source/reference/command/find.txt b/source/reference/command/find.txt index ad7a62553c5..5eb28cc7c50 100644 --- a/source/reference/command/find.txt +++ b/source/reference/command/find.txt @@ -545,6 +545,21 @@ Client Disconnection .. include:: /includes/extracts/4.2-changes-disconnect.rst +Versioned API +~~~~~~~~~~~~~ + +When using :ref:`Versioned API ` V1, the following +:dbcommand:`find` command fields are not supported: + +- ``awaitData`` +- ``max`` +- ``min`` +- ``noCursorTimeout`` +- ``oplogReplay`` +- ``returnKey`` +- ``showRecordId`` +- ``tailable`` + Examples -------- diff --git a/source/reference/command/setParameter.txt b/source/reference/command/setParameter.txt index 3f2b4bca315..25c39eeccce 100644 --- a/source/reference/command/setParameter.txt +++ b/source/reference/command/setParameter.txt @@ -10,12 +10,8 @@ setParameter :depth: 1 :class: singlecol -.. note:: - - Commands issued by the admin command :dbcommand:`setParameter` - do not survive server restarts. For a persistent option use the - :option:`--setParameter ` command line option - or the :setting:`setParameter` configuration file setting. +Definition +---------- .. dbcommand:: setParameter @@ -32,3 +28,20 @@ setParameter For the available parameters, including examples, see :doc:`/reference/parameters`. +Behavior +-------- + +Persistence +~~~~~~~~~~~ + +Commands issued by the admin command :dbcommand:`setParameter` +do not survive server restarts. For a persistent option use the +:option:`--setParameter ` command line option +or the :setting:`setParameter` configuration file setting. + +Versioned API +~~~~~~~~~~~~~ + +When using :ref:`Versioned API ` V1 with :ref:`apiStrict +` set to ``true``, you cannot use +:dbcommand:`setParameter` to modify server parameters. diff --git a/source/reference/versioned-api.txt b/source/reference/versioned-api.txt index 38d12d9e777..a7a7d196028 100644 --- a/source/reference/versioned-api.txt +++ b/source/reference/versioned-api.txt @@ -1,3 +1,5 @@ +.. _versioned-api: + ============= Versioned API ============= @@ -375,19 +377,19 @@ API V1 protects you from API-breaking changes for the following commands: - :dbcommand:`abortTransaction` -- :dbcommand:`aggregate` +- :dbcommand:`aggregate` (with limitations) [#versioned-api-command-limitations]_ - :dbcommand:`authenticate` - :dbcommand:`collMod` - :dbcommand:`commitTransaction` -- :dbcommand:`create` -- :dbcommand:`createIndexes` +- :dbcommand:`create` (with limitations) [#versioned-api-command-limitations]_ +- :dbcommand:`createIndexes` (with limitations) [#versioned-api-command-limitations]_ - :dbcommand:`delete` - :dbcommand:`drop` - :dbcommand:`dropDatabase` - :dbcommand:`dropIndexes` - :dbcommand:`endSessions` -- :dbcommand:`explain` -- :dbcommand:`find` +- :dbcommand:`explain` (with limitations) [#versioned-api-explain]_ +- :dbcommand:`find` (with limitations) [#versioned-api-command-limitations]_ - :dbcommand:`findAndModify` - :dbcommand:`getMore` - :dbcommand:`insert` @@ -400,6 +402,17 @@ for the following commands: - :dbcommand:`refreshSessions` - :dbcommand:`update` +.. [#versioned-api-command-limitations] + + API V1 may not support all available options for these commands. + Refer to the specific command documentation for limitations specific + to API V1. + +.. [#versioned-api-explain] + + MongoDB does not guarantee that the output of the + :dbcommand:`explain` command will conform to the same format in + future API versions. Parameters ----------