【发布时间】:2017-11-04 04:45:51
【问题描述】:
我需要有关此查询的帮助。 我在 AppVisitor 中查询 8000 个文档,填充了 4 个集合。但它没有返回任何结果。意味着它被卡住了,一段时间后 nodejs 服务器为执行此查询的路由返回 404 错误。
let Keys = yield AppVisitor.find(condition).sort({ createdAt: -1 })
.populate({ path: 'userDeatils' })
.populate({ path: 'details' })
.populate({
path: 'skills',
match: {
$and: [{ value: { $ne: '' } }, { value: { $ne: null } }, { value: { $not: /({R[\d]+})/g } }]
}
})
.populate({ path: 'courses' });
【问题讨论】:
-
嘿,您找到解决方案了吗?
标签: performance mongoose mongodb-query mongoose-populate