I know I can set TTL in MongoDB with
db.ttl_collection.ensureIndex( { "Date": 1 }, { expireAfterSeconds: 10 } )
and I know I can ensure index with Scala in Reactivemongo with
collection.indexesManager.ensure(index)
But how can I set TTL collections in reactivemongo from code? Or is there any other way to make expiring records in Mongo with reactivemongo in Scala?