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 @@ -1169,7 +1169,13 @@ The returned document contains a subset of the following fields:
11691169
11701170.. data:: update.n
11711171
1172- The number of documents selected for update. If the update operation
1172+ An ``update`` command accepts an array of document updates, some of
1173+ which can be :term:`upserts <upsert>`. For an update, ``n`` is the
1174+ number of documents selected for the update. For an upsert, ``n`` is
1175+ ``1`` for the inserted document. The server adds the ``n`` values for
1176+ all the updates and upserts and returns the total as ``update.n``.
1177+
1178+ If an update operation
11731179 results in no change to the document, e.g. :update:`$set` expression
11741180 updates the value to the current value, :data:`~update.n` can be
11751181 greater than :data:`~update.nModified`.
You can’t perform that action at this time.
0 commit comments