Time Series Collection Limitations¶
On this page
- Updates and Deletes
- Secondary Indexes
- Capped Collections
- Modification of Collection Type
- Modification of
- Modification of
- Schema Validation
- Client-Side Field Level Encryption
- Aggregation $out and $merge
- Change Streams
- Database Triggers
- GraphQL API
- Atlas Search
- Realm Sync
The maximum size of a measurement document is 4 MB.
Updates and Deletes¶
Time series collections only support insert operations and read queries. Updates and manual delete operations result in an error.
To automatically delete old data, set up automatic removal (TTL).
To remove all documents from a collection, use the
drop() method to drop the collection.
You can add secondary indexes on the fields
specified as the
timeField and the
metaField. If the field value
metaField field is a document, you can also create secondary
indexes on fields inside that document.
metaField doesn't support the following index types:
Secondary indexes don't support the following index properties:
A time series collection can't be created as a capped collection.
Modification of Collection Type¶
A collection's type can only be set when creating the collection:
- An existing collection can't be converted into a time series collection.
- A time series collection can't be converted into a different collection type.
To move data from an existing collection to a time series collection, migrate data into a time series collection.
You can only set a collection's
parameters when creating the collection. After creation these parameters
can't be modified.
granularity is set it can only be increased by one level at
a time. From
"minutes" or from
"hours". Other changes are not allowed. If you need to change the
"hours", first increase the
"minutes" and then to
Client-Side Field Level Encryption¶
Time series collections cannot currently be sharded.
Aggregation $out and $merge¶
Reads from time series collections are supported in transactions.