Skip to content

Commit 70e3fb3

Browse files
committed
MM PR fixes 1
1 parent c7932db commit 70e3fb3

File tree

1 file changed

+13
-9
lines changed

1 file changed

+13
-9
lines changed

source/write/update.txt

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -54,8 +54,9 @@ Each update method requires the following parameters:
5454
- **Query filter**, which matches which documents to update. To learn
5555
more about query filters, see the :ref:`kotlin-sync-specify-query`
5656
guide.
57+
5758
- **Update document**, which specifies the update operator, or the kind of update to
58-
perform, and the fields and values that should change. For a list of update
59+
perform, and the fields and values to be updated. For a list of update
5960
operators and their usages, see the :manual:`Field Update Operators
6061
guide page</reference/operator/update-field/>` in the {+mdb-server+} manual.
6162

@@ -71,6 +72,7 @@ House"``:
7172
:end-before: end-update-one
7273
:language: kotlin
7374
:copyable:
75+
:dedent:
7476

7577
Update Many Documents
7678
~~~~~~~~~~~~~~~~~~~~~
@@ -84,6 +86,7 @@ in which the ``name`` value is ``"Starbucks"``. The update renames the
8486
:end-before: end-update-many
8587
:language: kotlin
8688
:copyable:
89+
:dedent:
8790

8891
Customize the Update Operation
8992
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -124,11 +127,11 @@ configure an ``UpdateOptions`` instance:
124127
in the {+mdb-server+} manual.
125128

126129
* - ``arrayFilters()``
127-
- | Contains a list of filters that specifies which array elements an update applies
128-
to.
130+
- | Provides a list of filters that you specify to select which
131+
array elements the update applies to.
129132

130133
* - ``hint()``
131-
- | Gets or sets the index to scan for documents.
134+
- | Sets the index to use when matching documents.
132135
For more information, see the :manual:`hint statement </reference/command/update/#std-label-update-command-hint>`
133136
in the {+mdb-server+} manual.
134137

@@ -150,19 +153,20 @@ Modify Update Example
150153
`````````````````````
151154

152155
The following code uses the ``updateOne()`` method to match documents
153-
in which the ``name`` field has the value ``"Sunrise Pizzeria"``. It then
154-
sets the ``borough`` value in these documents to ``"Queens"`` and the
155-
``cuisine`` value to ``"Italian"``.
156+
in which the ``name`` field value is ``"Sunrise Pizzeria"``. It then
157+
sets the ``borough`` value in the first matching document to
158+
``"Queens"`` and the ``cuisine`` value to ``"Italian"``.
156159

157160
Because the ``upsert`` option is set to ``true``, the driver inserts a
158-
new document that has the fields and values in the update document if
159-
the query filter doesn't match any existing documents.
161+
new document that has the fields and values specified in the update
162+
document if the query filter doesn't match any existing documents.
160163

161164
.. literalinclude:: /includes/write/update.kt
162165
:start-after: start-update-options
163166
:end-before: end-update-options
164167
:language: kotlin
165168
:copyable:
169+
:dedent:
166170

167171
Return Value
168172
~~~~~~~~~~~~

0 commit comments

Comments
 (0)