Brilliant opened this issue 10 years ago · 1 comments
another solution 在数据库中建立url的索引,删除冗余选项 db.supply.ensureIndex({"url": -1}, {unique: true, dropDups: true})
url
db.supply.ensureIndex({"url": -1}, {unique: true, dropDups: true})
weakness 对于相同的url,保留的是最旧的信息,如果网站重复发布同一信息,无法获得更新