1、查询数组,或者$in
db.ServerInfo.find({"schoolIdSet" : {$in:[0,149]},})
2、查询数据,满足所有条件$all
db.ServerInfo.find({"schoolIdSet" : {$all:[0,149]}})
3、相等$eq
db.ServerInfo.find({"updataTime" : {$eq:NumberLong("1544409787328")}})
4、"$lt", "$lte", "$gt", "$gte", "$ne",对应于"<", "<=", ">", ">=","!="
5、数组中包含某个jsonobject ,使用 $elemMatch
db.group_assigned_applications.find({applicationList:{$elemMatch:{"packageName" : "com.aaa.test"}}})
6、多层嵌套 ,使用
db.user_installed_applications.find({"xxxx.xxxx._id":"xxx","xxxx.xxxx.xxx.packageName":"xxxxx"})