Skip to content

[Backport v5.5] DOCSP-50017 Remove EOL versions #221

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 23, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
144 changes: 20 additions & 124 deletions source/fundamentals/auth.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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 <default-auth-mechanism>`
* :ref:`SCRAM-SHA-256 <scram-sha-256-auth-mechanism>`
* :ref:`SCRAM-SHA-1 <scram-sha-1-auth-mechanism>`
* :ref:`MONGODB-CR <mongodb-cr-auth-mechanism>`
* :ref:`MONGODB-AWS <mongodb-aws-auth-mechanism>`
* :ref:`X.509 <x509-auth-mechanism>`

Expand All @@ -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::
Expand All @@ -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 </core/security-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::

Expand All @@ -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 <default-auth-mechanism>` to
connect using ``MONGODB-CR``.

.. _mongodb-aws-auth-mechanism:

``MONGODB-AWS``
~~~~~~~~~~~~~~~
MONGODB-AWS
~~~~~~~~~~~

.. note::

Expand Down Expand Up @@ -451,8 +347,8 @@ method:

.. _x509-auth-mechanism:

``X.509``
~~~~~~~~~
X.509
~~~~~

The ``X.509`` authentication mechanism uses
:wikipedia:`TLS <Transport_Layer_Security>` with X.509 certificates to
Expand Down
14 changes: 3 additions & 11 deletions source/fundamentals/builders/aggregates.txt
Original file line number Diff line number Diff line change
Expand Up @@ -870,11 +870,10 @@ Atlas Full-Text Search
Use the ``search()`` method to create a :manual:`$search </reference/operator/aggregation/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 </reference/atlas-search/index-definitions/>`.
This aggregation pipeline operator is only available for collections
with an :atlas:`Atlas search index </reference/atlas-search/index-definitions/>`.
Learn more about the required setup and the functionality of this operator
from the :ref:`Atlas Search <fts-top-ref>` documentation.

Expand Down Expand Up @@ -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 </atlas-search/query-syntax/#-searchmeta>`.

The following example shows the ``count`` metadata for an Atlas search
aggregation stage:

Expand Down
6 changes: 0 additions & 6 deletions source/fundamentals/builders/projections.txt
Original file line number Diff line number Diff line change
Expand Up @@ -230,12 +230,6 @@ When you've specified matching criteria in the **query** portion of your operati
variant to specify a :manual:`positional projection </reference/operator/projection/positional/#sorts-and-the-positional-operator>` 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::
Expand Down
6 changes: 3 additions & 3 deletions source/fundamentals/connection/network-compression.txt
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@ and your application.

The driver supports the following algorithms:

1. `Snappy <https://google.github.io/snappy/>`__: available in MongoDB 3.4 and later.
#. `Zlib <https://zlib.net/>`__: available in MongoDB 3.6 and later.
#. `Zstandard <https://github.com/facebook/zstd/>`__: available in MongoDB 4.2 and later.
1. `Snappy <https://google.github.io/snappy/>`__
#. `Zlib <https://zlib.net/>`__
#. `Zstandard <https://github.com/facebook/zstd/>`__

The driver tests against the following versions of these libraries:

Expand Down
4 changes: 2 additions & 2 deletions source/fundamentals/crud/read-operations/sort.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion source/fundamentals/enterprise-auth.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
11 changes: 5 additions & 6 deletions source/fundamentals/indexes.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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 </core/index-wildcard/>` to help support these queries.
Wildcard indexes are not designed to replace workload-based index planning.
are arbitrary with :manual:`wildcard indexes </core/index-wildcard/>`. 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 </applications/indexes>` and
Expand Down Expand Up @@ -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 </geospatial-queries>` in the Server manual.
Euclidean plane. To learn more, see :manual:`Geospatial Queries </geospatial-queries>`
in the Server manual.

Unique Indexes
~~~~~~~~~~~~~~
Expand Down Expand Up @@ -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
Expand Down
7 changes: 0 additions & 7 deletions source/fundamentals/stable-api.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
--------

Expand Down
7 changes: 1 addition & 6 deletions source/fundamentals/time-series.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down Expand Up @@ -93,8 +89,7 @@ and :ref:`aggregating data <kotlin-aggregation>`.

.. 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
Expand Down
27 changes: 1 addition & 26 deletions source/includes/mongodb-compatibility-table-kotlin.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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
- ⊛
- ✓
- ✓
- ✓
- ✓
- ✓
- ✓
- ✓
5 changes: 2 additions & 3 deletions source/usage-examples/bulkWrite.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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::

Expand Down
Loading
Loading