We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ef9e1f9 commit c963172Copy full SHA for c963172
source/core/sharded-cluster-requirements.txt
@@ -37,6 +37,16 @@ Single Document Modification Operations in Sharded Collections
37
38
.. include:: /includes/fact-single-modification-in-sharded-collections.rst
39
40
+To use :method:`~db.collection.findOneAndUpdate()` with a sharded
41
+collection, your query filter must include an equality condition on the
42
+:term:`shard key` to compare the key and value in either of these
43
+formats:
44
+
45
+.. code-block:: javascript
46
47
+ { key: value }
48
+ { key: { $eq: value } }
49
50
.. _sharding-requirements-unique-indexes:
51
52
Unique Indexes in Sharded Collections
0 commit comments