Skip to content
Panagiotis Matzavinos edited this page May 11, 2016 · 2 revisions

how to add a TTL index

db.aggregation_repository.createIndex( { "createdAt": 1 }, { expireAfterSeconds: 3600 } )

To reconfigure the index with a different expireAfterSeconds value: drop and recreate the index

Clone this wiki locally