###根据日期查找

db.getCollection('webExceptionRecord').find({createdDate: {"$gte":ISODate("2016-03-31T12:48:25.040+08:00")}})

###根据日期倒序排序

db.getCollection('webExceptionRecord').find({}).sort({createdDate:-1})

###查询“不等于”

db.getCollection('webExceptionRecord').find({version: {$not:/v5\.0\.5/}})

$not后边必须跟正则表达式或文档(regex or document)

db.getCollection('webExceptionRecord').find({version:{$nin:['v5.0.5']}})

$nin: not in

db.getCollection('appStatisticsActiveUser').find({count:{$not: {$lt:100}}})

###查询“包含”

db.getCollection('webExceptionRecord').find({version: {$regex:/.*5\.0\.5.*/}})

###查询“不包含”

db.getCollection('webExceptionRecord').find({version: {$not:/.*v5\.0\.5.*/}})