NamesArrayLength
, 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://lonelyprogram.blog.51cto.com/6246243/1355271