@@ -26,18 +26,30 @@ The maximum size of a measurement document is 4 MB.
2626Updates and Deletes
2727~~~~~~~~~~~~~~~~~~~
2828
29- :ref:`Time series collections <manual-timeseries-collection>` support update
30- and delete operations with limitations. The following operations are not supported
31- on time series collections:
32-
33- - :dbcommand:`findAndModify`.
34- - Updates that modify the ``timeField``.
35- - Updates with ``multi:false`` that modify the ``metaField``.
36- - Updates with ``upsert:true``.
37- - Updates or deletes in multi-document transactions.
38-
39- MongoDB supports all other update and delete operations. For more information,
40- see :ref:`<collection-method>`.
29+ Starting in MongoDB 5.1, you can perform some delete and update
30+ operations.
31+
32+ Delete commands must meet the following requirements:
33+
34+ - The query may only match on ``metaField`` field values.
35+ - The delete command may not limit the number of documents to be
36+ deleted. You must use a delete command with ``justOne: false`` or the
37+ :method:`~db.collection.deleteMany()` method.
38+
39+ Update commands must meet the following requirements:
40+
41+ - The query may only match on ``metaField`` field values.
42+ - The update command may only modify the ``metaField`` field value.
43+ - The update must be performed with an update document that contains
44+ only :ref:`update operator <update-operators>` expressions.
45+ - The update command may not limit the number of documents to be
46+ updated. You must use an update command with ``multi: true`` or the
47+ :method:`~db.collection.updateMany()` method.
48+ - The update command may not set :ref:`upsert: true <update-upsert>`.
49+
50+ In MongoDB 5.0, :ref:`Time series collections
51+ <manual-timeseries-collection>` only support insert operations and read
52+ queries. Updates and manual delete operations result in an error.
4153
4254To automatically delete old data, :ref:`set up automatic removal (TTL)
4355<set-up-automatic-removal>`.
0 commit comments