or | db.getCollection('collectionName').find({ $or: [{ field1: value1}, { field2: value1}] }) |
内嵌document查询 | db.getCollection('collectionName').find({ 'field1.field2.field3' : 'xxxxx' }) |
去重查询 | db.getCollection('collectionName').distinct('field1.field2', { del: false, 'field1.field2.field3': 'xxxxx' }) |
添加更新字段 | db.getCollection('collectionName').update({ field1: "value" }, { $set: { "sendToken" : false } },{multi:true}) |
去除字段 | db.getCollection('collectionName').update({}, { $unset: { "field1" : "" } },{multi:true}) |