diff --git a/source/reference/method/db.collection.update.txt b/source/reference/method/db.collection.update.txt index bb7ccd01345..7116170aba0 100644 --- a/source/reference/method/db.collection.update.txt +++ b/source/reference/method/db.collection.update.txt @@ -11,8 +11,8 @@ db.collection.update() accepts parameters in a more clear :term:`document` form to specify ``multi`` and ``upsert`` options. - The :method:`update() ` method provides the ability to - modify an existing document in a collection. + The :method:`update() ` method provides the + ability to modify an existing document in a collection. By default the :method:`update() ` method updates a single document. If you specify a ``multi`` update, the @@ -20,18 +20,19 @@ db.collection.update() documents in the collection that match the query criteria. If you specify ``upsert``, the :method:`update() ` method will insert the document if no document matches the query - criteria, and preform a conventional update otherwise. The - operation has the following form: + criteria; otherwise, it will perform a conventional update. + + Before version 2.2, in the :program:`mongo` shell, ``upsert`` and + ``multi`` were positional boolean options and the operation has the + following form: .. code-block:: javascript db.collection.update(query, update, ) - Before version 2.0, in the :program:`mongo` shell, ``upsert`` and - ``multi`` were positional boolean options. Since version 2.2, the - :method:`update() ` method can *also* take an - ``options`` :term:`document` as a parameter to specify the - ``multi`` and the ``upsert`` options. + Since version 2.2, the :method:`update() ` + method can *also* take an ``options`` :term:`document` as a + parameter to specify the ``multi`` and the ``upsert`` options. The :method:`update() ` method takes the following parameters: