快上网专注成都网站设计 成都网站制作 成都网站建设
成都网站建设公司服务热线:028-86922220

网站建设知识

十年网站开发经验 + 多家企业客户 + 靠谱的建站团队

量身定制 + 运营维护+专业推广+无忧售后,网站问题一站解决

mongodb查询size大于1的内嵌list的document

db.user_profile.find({ $where: "this.disk_rack.length > 1" } )
但是这种js引擎执行的会非常慢

更好的办法是
CreateextrafieldNamesArrayLength, update it with names array length and then use in queries:
db.accommodations.find({"NamesArrayLength": {$gt: 1} });

It will be better solution, and will work much faster (you can create index on it).

当前文章:mongodb查询size大于1的内嵌list的document
网站地址:http://6mz.cn/article/ijpppp.html

其他资讯