Skip to content

Commit dc2c976

Browse files
authored
DOCSP-46367: v5.3 release (#95)
1 parent 704e870 commit dc2c976

12 files changed

+89
-32
lines changed

config/redirects

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
define: prefix docs/languages/java/reactive-streams-driver
22
define: base https://www.mongodb.com/${prefix}
3-
define: versions v4.x v5.0 v5.1 v5.2 main
3+
define: versions v4.x v5.0 v5.1 v5.2 v5.3 main
44

55
symlink: current -> main
66

snooty.toml

+2-2
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@ toc_landing_pages = [
2121
[constants]
2222
driver-short = "Java Reactive Streams driver"
2323
driver-long = "MongoDB Java Reactive Streams Driver"
24-
version = "5.2"
25-
full-version = "{+version+}.1"
24+
version = "5.3"
25+
full-version = "{+version+}.0"
2626
api = "https://mongodb.github.io/mongo-java-driver/{+version+}/apidocs"
2727
rs-docs = "https://www.reactive-streams.org/reactive-streams-1.0.4-javadoc/org/reactivestreams"
2828
driver-source-gh = "https://github.com/mongodb/mongo-java-driver"

source/connect-to-mongo/connection-options.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -471,7 +471,7 @@ SRV Configuration
471471

472472
* - **srvServiceName**
473473
- | Sets the SRV service name. See
474-
| the `ClusterSettings.getSrvServiceName() <https://mongodb.github.io/mongo-java-driver/5.1/apidocs/mongodb-driver-core/com/mongodb/connection/ClusterSettings.html#getSrvServiceName()>`__
474+
| the `ClusterSettings.getSrvServiceName() <{+api+}/mongodb-driver-core/com/mongodb/connection/ClusterSettings.html#getSrvServiceName()>`__
475475
| API documentation to learn more.
476476
|
477477
| **Data Type**: {+string-data-type+}

source/connect-to-mongo/create-a-mongo-client.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -117,4 +117,4 @@ API Documentation
117117
To learn more about creating a ``MongoClient`` instance in the {+driver-short+},
118118
see the following API documentation:
119119

120-
- `MongoClient <https://mongodb.github.io/mongo-java-driver/5.1/apidocs/mongodb-driver-reactivestreams/com/mongodb/reactivestreams/client/MongoClients.html>`__
120+
- `MongoClient <{+api+}/mongodb-driver-reactivestreams/com/mongodb/reactivestreams/client/MongoClients.html>`__

source/includes/language-compatibility-table-java-rs.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
- Java 7
1212
- Java 6
1313

14-
* - 4.11 to 5.2
14+
* - 4.11 to 5.3
1515
- ✓
1616
- ✓
1717
- ✓

source/includes/mongodb-compatibility-table-java-rs.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
- MongoDB 4.0
1515
- MongoDB 3.6
1616

17-
* - 5.2
17+
* - 5.2 to 5.3
1818
- ✓
1919
- ✓
2020
- ✓

source/whats-new.txt

+23
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,35 @@ What's New
2020
Learn about new features, improvements, and fixes introduced in the
2121
following versions of the {+driver-long+}:
2222

23+
* :ref:`Version 5.3 <javars-version-5.3>`
2324
* :ref:`Version 5.2 <javars-version-5.2>`
2425
* :ref:`Version 5.1.3 <javars-version-5.1.3>`
2526
* :ref:`Version 5.1.2 <javars-version-5.1.2>`
2627
* :ref:`Version 5.1.1 <javars-version-5.1.1>`
2728
* :ref:`Version 5.1 <javars-version-5.1>`
2829

30+
.. _javars-version-5.3:
31+
32+
What's New in 5.3
33+
-----------------
34+
35+
The 5.3 driver release includes the following changes, fixes,
36+
and features:
37+
38+
.. sharedinclude:: dbx/jvm/v5.3-wn-items.rst
39+
40+
.. replacement:: vector-type-example-link
41+
42+
To learn about this type, see the
43+
`BinaryVector <{+api+}/bson/org/bson/BinaryVector.html>`__
44+
API documentation.
45+
46+
.. replacement:: update-replace-example-link
47+
48+
the :ref:`java-rs-write-update-docs`, :ref:`java-rs-write-replace`,
49+
and :ref:`java-rs-bulk-write` guides
50+
51+
2952
.. _javars-version-5.2:
3053

3154
What's New in 5.2

source/write/bulk-writes.txt

+24-3
Original file line numberDiff line numberDiff line change
@@ -81,8 +81,6 @@ the following arguments:
8181
operations, see the :manual:`Field Update Operators
8282
</reference/operator/update-field/>` guide in the {+mdb-server+} manual.
8383

84-
``UpdateOneModel`` updates *the first* document that matches your query filter.
85-
8684
The following example creates an instance of ``UpdateOneModel``:
8785

8886
.. literalinclude:: /includes/write/bulk-write.java
@@ -92,6 +90,16 @@ The following example creates an instance of ``UpdateOneModel``:
9290
:copyable:
9391
:dedent:
9492

93+
If multiple documents match the query filter specified in
94+
the ``UpdateOneModel`` instance, the operation updates the first
95+
result. You can specify a sort in an ``UpdateOptions`` instance to apply
96+
an order to matched documents before the driver performs the update
97+
operation, as shown in the following code:
98+
99+
.. code-block:: java
100+
101+
UpdateOptions options = UpdateOptions.sort(Sorts.ascending("_id"));
102+
95103
To update multiple documents, create an instance of ``UpdateManyModel`` and pass in
96104
the same arguments. ``UpdateManyModel`` updates *all* documents that match your query
97105
filter.
@@ -122,7 +130,20 @@ The following example creates an instance of ``ReplaceOneModel``:
122130
:copyable:
123131
:dedent:
124132

125-
To replace multiple documents, create an instance of ``ReplaceOneModel`` for each document.
133+
If multiple documents match the query filter specified in
134+
the ``ReplaceOneModel`` instance, the operation replaces the first
135+
result. You can specify a sort in a ``ReplaceOptions`` instance to apply
136+
an order to matched documents before the driver performs the replace
137+
operation, as shown in the following code:
138+
139+
.. code-block:: java
140+
141+
ReplaceOptions options = ReplaceOptions.sort(Sorts.ascending("_id"));
142+
143+
.. tip:: Replace Multiple Documents
144+
145+
To replace multiple documents, create an instance of
146+
``ReplaceOneModel`` for each document.
126147

127148
Delete Operations
128149
~~~~~~~~~~~~~~~~~

source/write/insert-documents.txt

+5-5
Original file line numberDiff line numberDiff line change
@@ -201,10 +201,10 @@ API Documentation
201201
To learn more about any of the methods or types discussed in this
202202
guide, see the following API documentation:
203203

204-
- `insertOne() <https://mongodb.github.io/mongo-java-driver/5.1/apidocs/mongodb-driver-reactivestreams/com/mongodb/reactivestreams/client/MongoCollection.html#insertOne(com.mongodb.reactivestreams.client.ClientSession,TDocument)>`__
204+
- `insertOne() <{+api+}/mongodb-driver-reactivestreams/com/mongodb/reactivestreams/client/MongoCollection.html#insertOne(com.mongodb.reactivestreams.client.ClientSession,TDocument)>`__
205205
- `insertMany()
206-
<https://mongodb.github.io/mongo-java-driver/5.1/apidocs/mongodb-driver-reactivestreams/com/mongodb/reactivestreams/client/MongoCollection.html#insertMany(com.mongodb.reactivestreams.client.ClientSession,java.util.List)>`__
207-
- `InsertOneOptions <https://mongodb.github.io/mongo-java-driver/5.1/apidocs/mongodb-driver-core/com/mongodb/client/model/InsertOneOptions.html>`__
206+
<{+api+}/mongodb-driver-reactivestreams/com/mongodb/reactivestreams/client/MongoCollection.html#insertMany(com.mongodb.reactivestreams.client.ClientSession,java.util.List)>`__
207+
- `InsertOneOptions <{+api+}/mongodb-driver-core/com/mongodb/client/model/InsertOneOptions.html>`__
208208
- `InsertManyOptions
209-
<https://mongodb.github.io/mongo-java-driver/5.1/apidocs/mongodb-driver-core/com/mongodb/client/model/InsertManyOptions.html>`__
210-
- `BsonValue <https://mongodb.github.io/mongo-java-driver/5.1/apidocs/bson/org/bson/BsonValue.html>`__
209+
<{+api+}/mongodb-driver-core/com/mongodb/client/model/InsertManyOptions.html>`__
210+
- `BsonValue <{+api+}/bson/org/bson/BsonValue.html>`__

source/write/replace-documents.txt

+10-4
Original file line numberDiff line numberDiff line change
@@ -51,10 +51,9 @@ Required Parameters
5151

5252
The ``replaceOne()`` method requires the following parameters:
5353

54-
- **Query filter** document, which determines which documents to replace.
55-
56-
For more information about query filters, see the :ref:`<java-rs-specify-query>`
57-
guide.
54+
- **Query filter** document, which determines which documents to
55+
replace. For more information about query filters, see the
56+
:ref:`<java-rs-specify-query>` guide.
5857

5958
- **Replace** document, which specifies the fields and values to insert in the new
6059
document.
@@ -147,6 +146,13 @@ to modify the ``replaceOne()`` method.
147146
</reference/command/update/#std-label-update-let-syntax>` in the
148147
MongoDB Server manual.
149148

149+
* - ``sort(Bson sort)``
150+
- | Sets the sort criteria to apply to the operation. If multiple
151+
documents match the query filter that you pass to the
152+
``replaceOne()`` method, the operation replaces the first
153+
result. You can set this option to apply an order to matched
154+
documents to have more control over which document is replaced.
155+
150156
* - ``upsert(Boolean upsert)``
151157
- | Specifies whether the replace operation performs an upsert operation if no
152158
documents match the query filter. For more information, see the :manual:`upsert

source/write/write-delete-documents.txt

+5-5
Original file line numberDiff line numberDiff line change
@@ -176,15 +176,15 @@ API Documentation
176176
To learn more about any of the methods or types discussed in this
177177
guide, see the following API documentation:
178178

179-
- `deleteOne() <https://mongodb.github.io/mongo-java-driver/5.1/apidocs/mongodb-driver-reactivestreams/com/mongodb/reactivestreams/client/MongoCollection.html#deleteOne(com.mongodb.reactivestreams.client.ClientSession,org.bson.conversions.Bson)>`__
179+
- `deleteOne() <{+api+}/mongodb-driver-reactivestreams/com/mongodb/reactivestreams/client/MongoCollection.html#deleteOne(com.mongodb.reactivestreams.client.ClientSession,org.bson.conversions.Bson)>`__
180180
- `deleteMany()
181-
<https://mongodb.github.io/mongo-java-driver/5.1/apidocs/mongodb-driver-reactivestreams/com/mongodb/reactivestreams/client/MongoCollection.html#deleteMany(com.mongodb.reactivestreams.client.ClientSession,org.bson.conversions.Bson)>`__
181+
<{+api+}/mongodb-driver-reactivestreams/com/mongodb/reactivestreams/client/MongoCollection.html#deleteMany(com.mongodb.reactivestreams.client.ClientSession,org.bson.conversions.Bson)>`__
182182
- `DeleteOptions
183-
<https://mongodb.github.io/mongo-java-driver/5.1/apidocs/mongodb-driver-core/com/mongodb/client/model/DeleteOptions.html>`__
183+
<{+api+}/mongodb-driver-core/com/mongodb/client/model/DeleteOptions.html>`__
184184
- `BsonValue
185-
<https://mongodb.github.io/mongo-java-driver/5.1/apidocs/bson/org/bson/BsonValue.html>`__
185+
<{+api+}/bson/org/bson/BsonValue.html>`__
186186
- `Collation
187-
<https://mongodb.github.io/mongo-java-driver/5.1/apidocs/mongodb-driver-core/com/mongodb/client/model/Collation.html>`__
187+
<{+api+}/mongodb-driver-core/com/mongodb/client/model/Collation.html>`__
188188

189189

190190

source/write/write-update-documents.txt

+15-8
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,7 @@ to modify an update operation:
175175
results. For more information, see :manual:`Collation </reference/collation/#std-label-collation>`
176176
in the MongoDB Server manual.
177177

178-
* - ``comment(Bson comment)``
178+
* - ``comment(BsonValue comment)``
179179
- | Attaches a ``Bson`` comment to the operation. For more information, see the :manual:`insert command
180180
fields </reference/command/insert/#command-fields>` guide in the
181181
MongoDB Server manual.
@@ -190,7 +190,7 @@ to modify an update operation:
190190
For more information, see the :manual:`hint statement </reference/command/update/#std-label-update-command-hint>`
191191
in the MongoDB Server manual.
192192

193-
* - ``hint(String hint)``
193+
* - ``hintString(String hint)``
194194
- | Sets the index for the operation as a ``String`` value.
195195
For more information, see the :manual:`hint statement </reference/command/update/#std-label-update-command-hint>`
196196
in the MongoDB Server manual.
@@ -202,6 +202,13 @@ to modify an update operation:
202202
</reference/command/update/#std-label-update-let-syntax>` in the
203203
MongoDB Server manual.
204204

205+
* - ``sort(Bson sort)``
206+
- | Sets the sort criteria to apply to the operation. If multiple
207+
documents match the query filter that you pass to the
208+
``updateOne()`` method, the operation updates the first
209+
result. You can set this option to apply an order to matched
210+
documents to have more control over which document is updated.
211+
205212
* - ``upsert(Boolean upsert)``
206213
- | Specifies whether the update operation performs an upsert operation if no
207214
documents match the query filter. For more information, see the :manual:`upsert
@@ -271,13 +278,13 @@ API Documentation
271278
To learn more about any of the methods or types discussed in this
272279
guide, see the following API documentation:
273280

274-
- `updateOne() <https://mongodb.github.io/mongo-java-driver/5.1/apidocs/mongodb-driver-reactivestreams/com/mongodb/reactivestreams/client/MongoCollection.html#updateOne(com.mongodb.reactivestreams.client.ClientSession,org.bson.conversions.Bson,java.util.List)>`__
281+
- `updateOne() <{+api+}/mongodb-driver-reactivestreams/com/mongodb/reactivestreams/client/MongoCollection.html#updateOne(com.mongodb.reactivestreams.client.ClientSession,org.bson.conversions.Bson,java.util.List)>`__
275282
- `updateMany()
276-
<https://mongodb.github.io/mongo-java-driver/5.1/apidocs/mongodb-driver-reactivestreams/com/mongodb/reactivestreams/client/MongoCollection.html#updateMany(com.mongodb.reactivestreams.client.ClientSession,org.bson.conversions.Bson,java.util.List)>`__
283+
<{+api+}/mongodb-driver-reactivestreams/com/mongodb/reactivestreams/client/MongoCollection.html#updateMany(com.mongodb.reactivestreams.client.ClientSession,org.bson.conversions.Bson,java.util.List)>`__
277284
- `UpdateOptions
278-
<https://mongodb.github.io/mongo-java-driver/5.1/apidocs/mongodb-driver-core/com/mongodb/client/model/UpdateOptions.html>`__
279-
- `UpdateResult <https://mongodb.github.io/mongo-java-driver/5.1/apidocs/mongodb-driver-core/com/mongodb/client/result/UpdateResult.html>`__
285+
<{+api+}/mongodb-driver-core/com/mongodb/client/model/UpdateOptions.html>`__
286+
- `UpdateResult <{+api+}/mongodb-driver-core/com/mongodb/client/result/UpdateResult.html>`__
280287
- `BsonValue
281-
<https://mongodb.github.io/mongo-java-driver/5.1/apidocs/bson/org/bson/BsonValue.html>`__
288+
<{+api+}/bson/org/bson/BsonValue.html>`__
282289
- `Collation
283-
<https://mongodb.github.io/mongo-java-driver/5.1/apidocs/mongodb-driver-core/com/mongodb/client/model/Collation.html>`__
290+
<{+api+}/mongodb-driver-core/com/mongodb/client/model/Collation.html>`__

0 commit comments

Comments
 (0)