|
|
@ -590,7 +590,7 @@ db.removeIndex('somefield', function (err) { |
|
|
|
}); |
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
// Example of using expireAfterSeconds to remove documents 1 hour |
|
|
|
// Example of using expireAfterSeconds to remove documents 1 hour |
|
|
|
// after their creation (timestampData option is true here) |
|
|
|
// after their creation (db's timestampData option is true here) |
|
|
|
db.ensureIndex({ fieldName: 'createdAt', expireAfterSeconds: 3600 }, function (err) { |
|
|
|
db.ensureIndex({ fieldName: 'createdAt', expireAfterSeconds: 3600 }, function (err) { |
|
|
|
}); |
|
|
|
}); |
|
|
|
``` |
|
|
|
``` |
|
|
|