//createIndex adds creates new indexing to existing collections indexes db.collection.createIndex( { "a": 1 }, { unique: true, sparse: true, expireAfterSeconds: 3600 } )