重庆分公司,新征程启航

为企业提供网站建设、域名注册、服务器等服务

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://cqcxhl.com/article/ijpppp.html

其他资讯

在线咨询
服务热线
服务热线:028-86922220
TOP