查询条数
db.getCollection('xhsNoteBean’).find({}).count()
添加索引
db.getCollection('xhsUserBean').ensureIndex({"title":1})
删除指定字段
db.getCollection('xhsUserBean').update({},{$unset:{'show_goods_list':''}},false, true)
把字段xhsType 更新到xhstype
db.getCollection('xhsNoteBean').find({'xhsType': {$gt: 0}}).forEach(
function(item){
db.getCollection('xhsNoteBean').update({'_id': item._id},{$set:{'xhstype': NumberInt(item.xhsType)}})
}
)