1
如何某些元素这已经是集(MongoDB中)如何添加TTL字段MongoDB中
如果我有收集一个元素(.iso文件)像下面显示上添加TTL(生存时间)字段:
db.videos.files.find().pretty()
{
"_id" : ObjectId("5400e505559ad1c150a3e489"),
"chunkSize" : NumberLong(262144),
"length" : NumberLong(754483200),
"md5" : "093866b3f0cc342c457217892d841f96",
"filename" : "GTA.UNDERGROUND.iso",
"contentType" : null,
"uploadDate" : ISODate("2014-08-29T20:39:33.019Z"),
"aliases" : null,
"metadata" : {
"description" : "Grand Theft Auto",
"tags" : [
"Action",
"HD"
]
}
如何在MongoDB中为此元素设置生存时间字段?
这是你想要的领域由TTL控制? – Wizard 2014-10-19 06:28:07