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 aebd00d commit 72067cdCopy full SHA for 72067cd
source/core/sharded-cluster-requirements.txt
@@ -39,6 +39,16 @@ Single Document Modification Operations in Sharded Collections
39
40
.. include:: /includes/fact-single-modification-in-sharded-collections.rst
41
42
+To use :method:`~db.collection.findOneAndUpdate()` with a sharded
43
+collection, your query filter must include an equality condition on the
44
+:term:`shard key` to compare the key and value in either of these
45
+formats:
46
+
47
+.. code-block:: javascript
48
49
+ { key: value }
50
+ { key: { $eq: value } }
51
52
.. _sharding-requirements-unique-indexes:
53
54
Unique Indexes in Sharded Collections
0 commit comments