Skip to content

Commit 757df82

Browse files
authored
DOCSP-52484: Restore driver server version mentions for v4.2+ (#13646)
* DOCSP-52484: Restore driver server version mentions for v4.2+ * Tech feedback
1 parent a2cc9ce commit 757df82

File tree

9 files changed

+58
-14
lines changed

9 files changed

+58
-14
lines changed

content/kotlin/upcoming/source/fundamentals/builders/aggregates.txt

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -870,12 +870,14 @@ Atlas Full-Text Search
870870
Use the ``search()`` method to create a :manual:`$search </reference/operator/aggregation/search/>`
871871
pipeline stage that specifies a full-text search of one or more fields.
872872

873-
.. tip:: Only Available on Collections with an Atlas Search Index
873+
.. tip:: Only Available on Atlas for MongoDB v4.2 and later
874874

875-
This aggregation pipeline operator is only available for collections
876-
with an :atlas:`Atlas search index </reference/atlas-search/index-definitions/>`.
877-
Learn more about the required setup and the functionality of this operator
878-
from the :ref:`Atlas Search <fts-top-ref>` documentation.
875+
This aggregation pipeline operator is only available for collections hosted
876+
on :atlas:`MongoDB Atlas </>` clusters running v4.2 or later that are covered
877+
by an :atlas:`Atlas search index
878+
</reference/atlas-search/index-definitions/>`. Learn more about the required
879+
setup and the functionality of this operator from the :ref:`Atlas Search
880+
<fts-top-ref>` documentation.
879881

880882
The following example creates a pipeline stage that searches the ``title``
881883
field in the ``movies`` collection for text that contains the word "Future":
@@ -919,6 +921,13 @@ Use the ``searchMeta()`` method to create a
919921
pipeline stage which returns only the metadata part of the results from
920922
Atlas full-text search queries.
921923

924+
.. tip:: Only Available on MongoDB Atlas v4.4.11 and later
925+
926+
This aggregation pipeline operator is only available
927+
for :atlas:`MongoDB Atlas </>` clusters running v4.4.11 and later. For a
928+
detailed list of version availability, see the MongoDB Atlas documentation
929+
on :atlas:`$searchMeta </atlas-search/aggregation-stages/searchMeta>`.
930+
922931
The following example shows the ``count`` metadata for an Atlas search
923932
aggregation stage:
924933

content/kotlin/upcoming/source/fundamentals/builders/projections.txt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -230,6 +230,12 @@ When you've specified matching criteria in the **query** portion of your operati
230230
variant to specify a :manual:`positional projection </reference/operator/projection/positional/#sorts-and-the-positional-operator>` to include
231231
the first element of an array. Only documents that match the query filter will be retrieved.
232232

233+
.. important::
234+
235+
In MongoDB versions earlier than 4.4, the specified array field must appear in
236+
the query filter. Beginning in MongoDB 4.4, you can use a positional project
237+
on an array field that does not appear in the query filter.
238+
233239
The following example projects the first element of the ``temperatures`` array:
234240

235241
.. io-code-block::

content/kotlin/upcoming/source/fundamentals/connection/network-compression.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ The driver supports the following algorithms:
1919

2020
1. `Snappy <https://google.github.io/snappy/>`__
2121
#. `Zlib <https://zlib.net/>`__
22-
#. `Zstandard <https://github.com/facebook/zstd/>`__
22+
#. `Zstandard <https://github.com/facebook/zstd/>`__: available in MongoDB 4.2 and later
2323

2424
The driver tests against the following versions of these libraries:
2525

content/kotlin/upcoming/source/fundamentals/crud/read-operations/sort.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -320,9 +320,9 @@ The data is modeled with the following Kotlin data class:
320320
OrderScore(id=5, description=one large vanilla and chocolate cake, score=0.6)
321321
OrderScore(id=2, description=two medium vanilla birthday cakes, score=0.6)
322322

323-
.. note:: Text Search Behavior in MongoDB 6.0 or Later
323+
.. note:: Text Search Behavior in MongoDB 4.4 or Later
324324

325-
The structure of text search has changed for MongoDB 6.0 or later. You no
325+
The structure of text search has changed for MongoDB 4.4 or later. You no
326326
longer need to project ``Projections.metaTextScore()`` into your
327327
``FindFlow`` instance in order to sort on the text score. In addition,
328328
the field name you specify in a ``$meta`` text score aggregation operation

content/kotlin/upcoming/source/fundamentals/indexes.txt

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -97,9 +97,11 @@ your application uses indexes:
9797
- Avoid adding indexes that you infrequently use. Note that when a write
9898
operation updates an indexed field, MongoDB updates the related index.
9999

100-
Since MongoDB supports dynamic schemas, applications can query against fields whose names cannot be known in advance or
101-
are arbitrary with :manual:`wildcard indexes </core/index-wildcard/>`. Wildcard indexes are
102-
not designed to replace workload-based index planning.
100+
Since MongoDB supports dynamic schemas, applications can query against fields
101+
whose names cannot be known in advance or are arbitrary. MongoDB 4.2 introduced
102+
:manual:`wildcard indexes </core/index-wildcard/>` to help support these
103+
queries. Wildcard indexes are not designed to replace workload-based index
104+
planning.
103105

104106
For more information on designing your data model and choosing indexes appropriate for your application, see the MongoDB
105107
server documentation on :manual:`Indexing Strategies </applications/indexes>` and
@@ -587,7 +589,7 @@ The following snippet removes the "title_text" index from the collection:
587589
Remove an Index Using a Wildcard Character
588590
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
589591

590-
You can drop all indexes by calling the
592+
Starting with MongoDB 4.2, you can drop all indexes by calling the
591593
``dropIndexes()`` method on your collection:
592594

593595
.. literalinclude:: /examples/generated/IndexesTest.snippet.drop-all-indexes.kt

content/kotlin/upcoming/source/fundamentals/stable-api.txt

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,13 @@
1414
:depth: 1
1515
:class: singlecol
1616

17+
.. note::
18+
19+
The {+stable-api+} feature requires MongoDB Server 5.0 or later.
20+
21+
You should only use the {+stable-api+} feature if all the MongoDB
22+
servers you are connecting to support this feature.
23+
1724
Overview
1825
--------
1926

content/kotlin/upcoming/source/fundamentals/time-series.txt

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,10 @@ method:
5353
.. literalinclude:: /examples/generated/TimeSeriesTest.snippet.create-time-series-collection.kt
5454
:language: kotlin
5555

56+
.. important::
57+
58+
Versions earlier than MongoDB 5.0 cannot create a time series collection.
59+
5660
To check if you successfully created the collection, send the
5761
``"listCollections"`` command to the `runCommand() <{+driver-api+}/-mongo-database/run-command.html>`__ method.
5862

@@ -89,8 +93,9 @@ and :ref:`aggregating data <kotlin-aggregation>`.
8993

9094
.. note:: Window Functions
9195

92-
You can use window functions to perform operations on a
93-
contiguous span of time series data.
96+
MongoDB version 5.0 introduces window functions into the aggregation
97+
pipeline. You can use window functions to perform operations on a contiguous
98+
span of time series data.
9499

95100
For more information, see our
96101
:ref:`Aggregates Builders guide <builders-aggregates-setWindowFields>`.

content/kotlin/upcoming/source/includes/mongodb-compatibility-table-kotlin.rst

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,19 @@
77
- MongoDB 8.0
88
- MongoDB 7.0
99
- MongoDB 6.0
10+
- MongoDB 5.0
11+
- MongoDB 4.2
1012

1113
* - 5.2 to 5.5
1214
- ✓
1315
- ✓
1416
- ✓
17+
- ✓
18+
- ✓
1519

1620
* - 4.10 to 5.1
1721
- ⊛
1822
- ✓
1923
- ✓
24+
- ✓
25+
- ✓

content/kotlin/upcoming/source/usage-examples/count.txt

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,15 @@ When you call the ``countDocuments()`` method, you can optionally pass a
3636
**query filter** parameter. You cannot pass any parameters when you call
3737
``estimatedDocumentCount()``.
3838

39+
.. important:: Stable API V1 and MongoDB Server Issue
40+
41+
If you are using the {+stable-api+} ``v1`` with the "strict" option and a
42+
MongoDB server version between 5.0.0 and 5.0.8 inclusive, method calls to
43+
``estimatedDocumentCount()`` may error due to a server bug.
44+
45+
Upgrade to MongoDB server 5.0.9 or later, or set the {+stable-api+} "strict" option to
46+
``false`` to avoid this issue.
47+
3948
You can also pass an optional parameter to either of these methods to
4049
specify the behavior of the call:
4150

0 commit comments

Comments
 (0)