在 MongoDB 中,你可以使用 db.collection.update()
方法来修改日期索引的过期时间。例如:
db.collection.update(
{"expireAt": { $exists: true } },
{ $set: { "expireAt": new Date("2023-01-01") } },
{ multi: true }
)
在 MongoDB 中,你可以使用 db.collection.update()
方法来修改日期索引的过期时间。例如:
db.collection.update(
{"expireAt": { $exists: true } },
{ $set: { "expireAt": new Date("2023-01-01") } },
{ multi: true }
)