diff --git a/source/fundamentals/auth.txt b/source/fundamentals/auth.txt index d8eee0f8..a49170fd 100644 --- a/source/fundamentals/auth.txt +++ b/source/fundamentals/auth.txt @@ -26,10 +26,7 @@ confirm identity and establish trust to ensure security. The mechanisms that you can use with the latest version of MongoDB Community Edition are as follows: -* :ref:`Default ` * :ref:`SCRAM-SHA-256 ` -* :ref:`SCRAM-SHA-1 ` -* :ref:`MONGODB-CR ` * :ref:`MONGODB-AWS ` * :ref:`X.509 ` @@ -48,38 +45,31 @@ Mechanisms ---------- .. _default-auth-mechanism: +.. _scram-sha-256-auth-mechanism: -Default -~~~~~~~ - -The default authentication mechanism setting uses one of the following -authentication mechanisms depending on what your MongoDB server supports: - -#. ``SCRAM-SHA-256`` -#. ``SCRAM-SHA-1`` -#. ``MONGODB-CR`` +SCRAM-SHA-256 +~~~~~~~~~~~~~ -Server versions 3.6 and earlier use ``MONGODB-CR`` as the default -mechanism. Newer versions of the server use one of the mechanisms for -which they advertise support. +``SCRAM-SHA-256`` is a salted challenge-response authentication mechanism +(SCRAM) that uses your username and password, encrypted with the ``SHA-256`` +algorithm, to authenticate your user. This is the default authentication +mechanism. The following code snippets show how to specify the authentication mechanism, using the following placeholders: -* ``db_username`` - your MongoDB database username -* ``db_password`` - your MongoDB database user's password -* ``hostname`` - network address of your MongoDB server, accessible by your client -* ``port`` - port number of your MongoDB server +* ``db_username`` - your MongoDB database username. +* ``db_password`` - your MongoDB database user's password. +* ``hostname`` - network address of your MongoDB server, accessible by your client. +* ``port`` - port number of your MongoDB server. * ``authenticationDb`` - MongoDB database that contains your user's authentication data. If you omit this parameter, the driver uses the default value ``admin``. Select the :guilabel:`Connection String` or the :guilabel:`MongoCredential` -tab below for instructions and sample code for specifying this authentication +tab below for instructions and sample code to specify this default authentication mechanism: -.. _mongo-client-setting-with-mongo-credential-example: - .. tabs:: .. tab:: @@ -102,38 +92,10 @@ mechanism: .. literalinclude:: /examples/generated/AuthTest.snippet.default-mongo-cred.kt :language: kotlin -For more information on the challenge-response (CR) and salted -challenge-response authentication mechanisms (SCRAM) that MongoDB supports, -see the :manual:`SCRAM ` section of the Server manual. - -.. _scram-sha-256-auth-mechanism: - -``SCRAM-SHA-256`` -~~~~~~~~~~~~~~~~~ - -.. note:: - - ``SCRAM-SHA-256`` is the default authentication method for MongoDB starting - in MongoDB 4.0. - -``SCRAM-SHA-256`` is a salted challenge-response authentication mechanism -(SCRAM) that uses your username and password, encrypted with the ``SHA-256`` -algorithm, to authenticate your user. - -The following code snippets show how to specify the authentication mechanism, -using the following placeholders: - -* ``db_username`` - your MongoDB database username. -* ``db_password`` - your MongoDB database user's password. -* ``hostname`` - network address of your MongoDB server, accessible by your client. -* ``port`` - port number of your MongoDB server. -* ``authenticationDb`` - MongoDB database that contains your user's - authentication data. If you omit this parameter, the driver uses the - default value ``admin``. - -Select the :guilabel:`Connection String` or the :guilabel:`MongoCredential` -tab below for instructions and sample code for specifying this authentication -mechanism: +You can also explicitly specify the ``SCRAM-SHA-256`` authentication mechanism, +as shown in the following code snippets. Select the :guilabel:`Connection String` +or the :guilabel:`MongoCredential` tab below for instructions and sample code for +specifying this authentication mechanism: .. tabs:: @@ -159,76 +121,10 @@ mechanism: .. literalinclude:: /examples/generated/AuthTest.snippet.scram-sha-256-cred.kt :language: kotlin -.. _scram-sha-1-auth-mechanism: - -``SCRAM-SHA-1`` -~~~~~~~~~~~~~~~ - -.. note:: - ``SCRAM-SHA-1`` is the default authentication method for MongoDB versions - 3.0, 3.2, 3.4, and 3.6. - -``SCRAM-SHA-1`` is a salted challenge-response mechanism (SCRAM) that uses your -username and password, encrypted with the ``SHA-1`` algorithm, to authenticate -your user. - -The following code snippets show how to specify the authentication mechanism, -using the following placeholders: - -* ``db_username`` - your MongoDB database username. -* ``db_password`` - your MongoDB database user's password. -* ``hostname`` - network address of your MongoDB server, accessible by your client. -* ``port`` - port number of your MongoDB server. -* ``authenticationDb`` - MongoDB database that contains your user's - authentication data. If you omit this parameter, the driver uses the - default value ``admin``. - -Select the :guilabel:`Connection String` or the :guilabel:`MongoCredential` -tab below for instructions and sample code for specifying this authentication -mechanism: - -.. tabs:: - - .. tab:: - :tabid: Connection String - - To specify the ``SCRAM-SHA-1`` authentication mechanism using a - connection string, assign the ``authMechanism`` parameter the value - ``SCRAM-SHA-1`` in your connection string. Your code to instantiate - a ``MongoClient`` should resemble the following: - - .. literalinclude:: /examples/generated/AuthTest.snippet.scram-sha-1-string.kt - :language: kotlin - - .. tab:: - :tabid: MongoCredential - - To specify the default authentication mechanism using the - ``MongoCredential`` class, use the - `createScramSha1Credential() <{+core-api+}/MongoCredential.html#createScramSha1Credential(java.lang.String,java.lang.String,char[])>`__ - method. Your code to instantiate a ``MongoClient`` should resemble the following: - - .. literalinclude:: /examples/generated/AuthTest.snippet.scram-sha-1-cred.kt - :language: kotlin - -.. _mongodb-cr-auth-mechanism: - -``MONGODB-CR`` -~~~~~~~~~~~~~~ - -``MONGODB-CR`` is a challenge-response authentication mechanism that uses your -username and password to authenticate your user. This authentication -mechanism was deprecated starting in MongoDB 3.6 and is no longer -supported as of MongoDB 4.0. - -You cannot specify this method explicitly; refer to the fallback provided -by the :ref:`default authentication mechanism ` to -connect using ``MONGODB-CR``. - .. _mongodb-aws-auth-mechanism: -``MONGODB-AWS`` -~~~~~~~~~~~~~~~ +MONGODB-AWS +~~~~~~~~~~~ .. note:: @@ -451,8 +347,8 @@ method: .. _x509-auth-mechanism: -``X.509`` -~~~~~~~~~ +X.509 +~~~~~ The ``X.509`` authentication mechanism uses :wikipedia:`TLS ` with X.509 certificates to diff --git a/source/fundamentals/builders/aggregates.txt b/source/fundamentals/builders/aggregates.txt index 1413b0bf..1d03ef1b 100644 --- a/source/fundamentals/builders/aggregates.txt +++ b/source/fundamentals/builders/aggregates.txt @@ -870,11 +870,10 @@ Atlas Full-Text Search Use the ``search()`` method to create a :manual:`$search ` pipeline stage that specifies a full-text search of one or more fields. -.. tip:: Only Available on Atlas for MongoDB v4.2 and later +.. tip:: Only Available on Collections with an Atlas Search Index - This aggregation pipeline operator is only available for collections hosted - on :atlas:`MongoDB Atlas ` clusters running v4.2 or later that are - covered by an :atlas:`Atlas search index `. + This aggregation pipeline operator is only available for collections + with an :atlas:`Atlas search index `. Learn more about the required setup and the functionality of this operator from the :ref:`Atlas Search ` documentation. @@ -920,13 +919,6 @@ Use the ``searchMeta()`` method to create a pipeline stage which returns only the metadata part of the results from Atlas full-text search queries. -.. tip:: Only Available on Atlas for MongoDB v4.4.11 and later - - This aggregation pipeline operator is only available - on :atlas:`MongoDB Atlas ` clusters running v4.4.11 and later. For a - detailed list of version availability, see the MongoDB Atlas documentation - on :atlas:`$searchMeta `. - The following example shows the ``count`` metadata for an Atlas search aggregation stage: diff --git a/source/fundamentals/builders/projections.txt b/source/fundamentals/builders/projections.txt index 7c376749..058f5491 100644 --- a/source/fundamentals/builders/projections.txt +++ b/source/fundamentals/builders/projections.txt @@ -230,12 +230,6 @@ When you've specified matching criteria in the **query** portion of your operati variant to specify a :manual:`positional projection ` to include the first element of an array. Only documents that match the query filter will be retrieved. -.. important:: - - In MongoDB version 4.4 and earlier, the specified array field must appear in the query filter. Beginning in MongoDB 4.4, - you can use a positional project on an array field that does not appear in the query filter. - - The following example projects the first element of the ``temperatures`` array: .. io-code-block:: diff --git a/source/fundamentals/connection/network-compression.txt b/source/fundamentals/connection/network-compression.txt index c7e2544f..48a4112c 100644 --- a/source/fundamentals/connection/network-compression.txt +++ b/source/fundamentals/connection/network-compression.txt @@ -17,9 +17,9 @@ and your application. The driver supports the following algorithms: -1. `Snappy `__: available in MongoDB 3.4 and later. -#. `Zlib `__: available in MongoDB 3.6 and later. -#. `Zstandard `__: available in MongoDB 4.2 and later. +1. `Snappy `__ +#. `Zlib `__ +#. `Zstandard `__ The driver tests against the following versions of these libraries: diff --git a/source/fundamentals/crud/read-operations/sort.txt b/source/fundamentals/crud/read-operations/sort.txt index 9d31514b..f53d680e 100644 --- a/source/fundamentals/crud/read-operations/sort.txt +++ b/source/fundamentals/crud/read-operations/sort.txt @@ -320,9 +320,9 @@ The data is modeled with the following Kotlin data class: OrderScore(id=5, description=one large vanilla and chocolate cake, score=0.6) OrderScore(id=2, description=two medium vanilla birthday cakes, score=0.6) -.. note:: Text Search Behavior in MongoDB 4.4 or Later +.. note:: Text Search Behavior in MongoDB 6.0 or Later - The structure of text search has changed for MongoDB 4.4 or later. You no + The structure of text search has changed for MongoDB 6.0 or later. You no longer need to project ``Projections.metaTextScore()`` into your ``FindFlow`` instance in order to sort on the text score. In addition, the field name you specify in a ``$meta`` text score aggregation operation diff --git a/source/fundamentals/enterprise-auth.txt b/source/fundamentals/enterprise-auth.txt index c20fe099..a00eae9e 100644 --- a/source/fundamentals/enterprise-auth.txt +++ b/source/fundamentals/enterprise-auth.txt @@ -229,7 +229,7 @@ to improve performance. LDAP (PLAIN) ~~~~~~~~~~~~ -*Available in MongoDB Enterprise Edition 3.4 and later.* +*Available in MongoDB Enterprise Edition.* You can authenticate to a Lightweight Directory Access Protocol (LDAP) server using your directory server username and password. diff --git a/source/fundamentals/indexes.txt b/source/fundamentals/indexes.txt index 05928e1f..01ef2a5b 100644 --- a/source/fundamentals/indexes.txt +++ b/source/fundamentals/indexes.txt @@ -98,8 +98,8 @@ your application uses indexes: operation updates an indexed field, MongoDB updates the related index. Since MongoDB supports dynamic schemas, applications can query against fields whose names cannot be known in advance or -are arbitrary. MongoDB 4.2 introduced :manual:`wildcard indexes ` to help support these queries. -Wildcard indexes are not designed to replace workload-based index planning. +are arbitrary with :manual:`wildcard indexes `. Wildcard indexes are +not designed to replace workload-based index planning. For more information on designing your data model and choosing indexes appropriate for your application, see the MongoDB server documentation on :manual:`Indexing Strategies ` and @@ -453,9 +453,8 @@ created in the preceding code snippet: :language: kotlin MongoDB also supports ``2d`` indexes for calculating distances on a -Euclidean plane and for working with the "legacy coordinate pairs" -syntax used in MongoDB 2.2 and earlier. To learn more, see -:manual:`Geospatial Queries ` in the Server manual. +Euclidean plane. To learn more, see :manual:`Geospatial Queries ` +in the Server manual. Unique Indexes ~~~~~~~~~~~~~~ @@ -588,7 +587,7 @@ The following snippet removes the "title_text" index from the collection: Remove an Index Using a Wildcard Character ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -Starting with MongoDB 4.2, you can drop all indexes by calling the +You can drop all indexes by calling the ``dropIndexes()`` method on your collection: .. literalinclude:: /examples/generated/IndexesTest.snippet.drop-all-indexes.kt diff --git a/source/fundamentals/stable-api.txt b/source/fundamentals/stable-api.txt index 6f87eb21..a3678e08 100644 --- a/source/fundamentals/stable-api.txt +++ b/source/fundamentals/stable-api.txt @@ -14,13 +14,6 @@ :depth: 1 :class: singlecol -.. note:: - - The {+stable-api+} feature requires MongoDB Server 5.0 or later. - - You should only use the {+stable-api+} feature if all the MongoDB - servers you are connecting to support this feature. - Overview -------- diff --git a/source/fundamentals/time-series.txt b/source/fundamentals/time-series.txt index 43122da0..d43b98f4 100644 --- a/source/fundamentals/time-series.txt +++ b/source/fundamentals/time-series.txt @@ -53,10 +53,6 @@ method: .. literalinclude:: /examples/generated/TimeSeriesTest.snippet.create-time-series-collection.kt :language: kotlin -.. important:: - - Versions prior to MongoDB 5.0 cannot create a time series collection. - To check if you successfully created the collection, send the ``"listCollections"`` command to the `runCommand() <{+driver-api+}/-mongo-database/run-command.html>`__ method. @@ -93,8 +89,7 @@ and :ref:`aggregating data `. .. note:: Window Functions - MongoDB version 5.0 introduces window functions into the aggregation - pipeline. You can use window functions to perform operations on a + You can use window functions to perform operations on a contiguous span of time series data. For more information, see our diff --git a/source/includes/mongodb-compatibility-table-kotlin.rst b/source/includes/mongodb-compatibility-table-kotlin.rst index 8987e815..d8328327 100644 --- a/source/includes/mongodb-compatibility-table-kotlin.rst +++ b/source/includes/mongodb-compatibility-table-kotlin.rst @@ -7,38 +7,13 @@ - MongoDB 8.0 - MongoDB 7.0 - MongoDB 6.0 - - MongoDB 5.0 - - MongoDB 4.4 - - MongoDB 4.2 - - MongoDB 4.0 - - MongoDB 3.6 - * - 5.5 + * - 5.2 to 5.5 - ✓ - ✓ - ✓ - - ✓ - - ✓ - - ✓ - - - - - - * - 5.2 to 5.4 - - ✓ - - ✓ - - ✓ - - ✓ - - ✓ - - ✓ - - ✓ - - * - 4.10 to 5.1 - ⊛ - ✓ - ✓ - - ✓ - - ✓ - - ✓ - - ✓ - - ✓ diff --git a/source/usage-examples/bulkWrite.txt b/source/usage-examples/bulkWrite.txt index 74057073..6d17bf8c 100644 --- a/source/usage-examples/bulkWrite.txt +++ b/source/usage-examples/bulkWrite.txt @@ -34,9 +34,8 @@ The ``bulkWrite()`` method accepts the following parameters: .. note:: - Retryable writes run on MongoDB server versions 3.6 or later in bulk - write operations unless they include one or more instances of - ``UpdateManyModel`` or ``DeleteManyModel``. + Retryable writes run in bulk write operations unless they include one or + more instances of ``UpdateManyModel`` or ``DeleteManyModel``. .. tip:: diff --git a/source/usage-examples/count.txt b/source/usage-examples/count.txt index e93ecd9f..3433a9a6 100644 --- a/source/usage-examples/count.txt +++ b/source/usage-examples/count.txt @@ -36,15 +36,6 @@ When you call the ``countDocuments()`` method, you can optionally pass a **query filter** parameter. You cannot pass any parameters when you call ``estimatedDocumentCount()``. -.. important:: Stable API V1 and MongoDB Server Issue - - If you are using the Stable API ``V1`` with the "strict" option and a - MongoDB server version between 5.0.0 and 5.0.8 inclusive, method calls to - ``estimatedDocumentCount()`` may error due to a server bug. - - Upgrade to MongoDB server 5.0.9 or set the Stable API "strict" option to - ``false`` to avoid this issue. - You can also pass an optional parameter to either of these methods to specify the behavior of the call: