File tree Expand file tree Collapse file tree 1 file changed +20
-3
lines changed Expand file tree Collapse file tree 1 file changed +20
-3
lines changed Original file line number Diff line number Diff line change @@ -24,9 +24,26 @@ The maximum size of a measurement document is 4 MB.
24
24
Updates and Deletes
25
25
~~~~~~~~~~~~~~~~~~~
26
26
27
- :ref:`Time series collections <manual-timeseries-collection>` only
28
- support insert operations and read queries. Updates and manual delete operations
29
- result in an error.
27
+ Starting in MongoDB 5.0.5, you can perform some delete and update
28
+ operations.
29
+
30
+ Delete commands must meet the following requirements:
31
+
32
+ - The query may only match on ``metaField`` field values.
33
+ - The delete command may not limit the number of documents to be
34
+ deleted. You must use a delete command with ``justOne: false`` or the
35
+ :method:`~db.collection.deleteMany()` method.
36
+
37
+ Update commands must meet the following requirements:
38
+
39
+ - The query may only match on ``metaField`` field values.
40
+ - The update command may only modify the ``metaField`` field value.
41
+ - The update must be performed with an update document that contains
42
+ only :ref:`update operator <update-operators>` expressions.
43
+ - The update command may not limit the number of documents to be
44
+ updated. You must use an update command with ``multi: true`` or the
45
+ :method:`~db.collection.updateMany()` method.
46
+ - The update command may not set :ref:`upsert: true <update-upsert>`.
30
47
31
48
To automatically delete old data, :ref:`set up automatic removal (TTL)
32
49
<set-up-automatic-removal>`.
You can’t perform that action at this time.
0 commit comments