diff --git a/source/core/sharded-cluster-requirements.txt b/source/core/sharded-cluster-requirements.txt index 140b4c88c9b..c25688b7e58 100644 --- a/source/core/sharded-cluster-requirements.txt +++ b/source/core/sharded-cluster-requirements.txt @@ -39,6 +39,16 @@ Single Document Modification Operations in Sharded Collections .. include:: /includes/fact-single-modification-in-sharded-collections.rst +To use :method:`~db.collection.findOneAndUpdate()` with a sharded +collection, your query filter must include an equality condition on the +:term:`shard key` to compare the key and value in either of these +formats: + +.. code-block:: javascript + + { key: value } + { key: { $eq: value } } + .. _sharding-requirements-unique-indexes: Unique Indexes in Sharded Collections