File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -1173,7 +1173,13 @@ The returned document contains a subset of the following fields:
1173
1173
1174
1174
.. data:: update.n
1175
1175
1176
- The number of documents selected for update. If the update operation
1176
+ An ``update`` command accepts an array of document updates, some of
1177
+ which can be :term:`upserts <upsert>`. For an update, ``n`` is the
1178
+ number of documents selected for the update. For an upsert, ``n`` is
1179
+ ``1`` for the inserted document. The server adds the ``n`` values for
1180
+ all the updates and upserts and returns the total as ``update.n``.
1181
+
1182
+ If an update operation
1177
1183
results in no change to the document, e.g. :update:`$set` expression
1178
1184
updates the value to the current value, :data:`~update.n` can be
1179
1185
greater than :data:`~update.nModified`.
You can’t perform that action at this time.
0 commit comments