Create a Clustered Collection
On this page
Clustered collections are collections with a clustered index. Clustered collections store documents ordered by clustered index key value. You can use clustered collections when only one clustered index is necessary.
Restrictions
Clustered collection limitations:
The clustered index key must be on the
_id
field.Clustered collections may not be capped collections.
Steps
1
3
4
5
(Optional) Enter the number of seconds for the expireAfterSeconds field.
The expireAfterSeconds field is a TTL index that enables automatic deletion of documents older than the specified number of seconds. The expireAfterSeconds field must be a positive, non-zero value.