为什么我不能使用$ lookup? [英] Why can't I use $lookup?
问题描述
我正在尝试使用$lookup聚合阶段>聚合和反应聚合.不幸的是我遇到了这个错误.
I am trying to use the $lookup
aggregate stage in meteor mongo using aggregate and reactive-aggregate. Unfortunately I am getting this error.
来自子Feed ID H3yhzuXdAk6LuQa7h MongoError的异常:异常: 无法识别的管道阶段名称:"$ lookUp"
Exception from sub Feed id H3yhzuXdAk6LuQa7h MongoError: exception: Unrecognized pipeline stage name: '$lookUp'
I know I am not the only one struggling here based on the meteor blogs, https://forums.meteor.com/t/new-mongodb-lookup-aggregation-operator-in-3-2/6784, so any inputs ideas, workarounds but most particularly working source examples of reactive aggregates with $lookup
would be great.
好的,所以我通过单击test.bat启动我的流星应用程序
Alright so I start my meteor app by clicking test.bat
cd "."
start myDb.bat
start dbShell.bat
%MONGO_URL%=mongodb://localhost:27017/common
start met.bat
start "google chrome" http://localhost:3000
mydb.bat
mongod
met.bat
meteor
bdShell.bat
bdShell.bat
mongo
link.bat
start "google chrome" http://localhost:3000
推荐答案
问题是流星的默认mongo固定为2.6.7(1.3版本的流星).
The problem is that meteor's default mongo is pinned at 2.6.7 (at 1.3 version meteor).
将您的mongo网址设置为3.2数据库以使用查找
Set your mongo url to a 3.2 database to use lookup
$ MONGO_URL=mongodb://localhost/meteor meteor
(其中mongo网址指向3.2 db)
(where mongo url points to a 3.2 db)
这篇关于为什么我不能使用$ lookup?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!