@@ -307,21 +307,25 @@ Improved Bulk Write Command
307307---------------------------
308308
309309Starting with {+mdb-server+} version 8.0 and {+driver-short+} version 5.3, there
310- is an improved bulk write method, ``MongoClient.bulkWrite()``, that can be used
311- to write to different databases and collections in the same cluster.
310+ is an improved bulk write method, ``MongoClient.bulkWrite()``, that writes to
311+ different databases and collections in the same cluster.
312312
313313In the previous examples on this page, the ``bulkWrite()`` method takes a list
314- of ``WriteModel`` documents. The specified subclass of ``WriteModel`` represents
315- the corresponding write operation. For example, ``InsertOneModel`` represents
316- inserting one document. Similarly, the new ``bulkWrite()`` method takes a
314+ of ``WriteModel`` documents in which the specified subclass of ``WriteModel``
315+ represents the corresponding write operation. For example, ``InsertOneModel``
316+ represents inserting one document.
317+
318+ Similarly, the new ``bulkWrite()`` method takes a
317319list of ``ClientNamespacedWriteModel`` objects to represent the write operation.
318320However, you do not need to specify the subclass that represents the corresponding
319321write operation. Instead, the ``ClientNamespacedWriteModel`` object contains different
320322methods to represent different write operations, such as ``insertOne()`` or
321- ``updateOne()``. These methods take a ``MongoNamespace object that defines which
322- database and collection to write to and a ``Document`` object that defines the
323+ ``updateOne()``.
324+
325+ These methods take a ``MongoNamespace`` object that defines which
326+ database and collection to write to, and a ``Document`` object that defines the
323327document information. Some methods, such as ``updateOne()`` and ``replaceOne()``,
324- also take a ``filter `` object.
328+ also take a ``Filters `` object that defines the filter for the operation .
325329
326330The following sections describe how to use the new ``bulkWrite()`` method.
327331
@@ -400,11 +404,11 @@ The following code shows how to use the ``ordered()`` method on the
400404``ClientBulkWriteOptions`` object.
401405
402406.. code-block:: java
407+
403408 MongoNamespace namespace = new MongoNamespace("db", "people");
404409
405410 ClientBulkWriteOptions options = new ClientBulkWriteOptions().ordered(false);
406411
407-
408412 ClientBulkWriteResult result = client.bulkWrite(List<>(
409413 ClientNamespacedWriteModel.insertOne(namespace, new Document("name", "Donkey Kong")),
410414 ClientNamespacedWriteModel.insertOne(namespace, new Document("name", "Mario"))
0 commit comments