Why can't I use $lookup?

本秂侑毒 提交于 2019-12-11 05:23:54

问题


I am trying to use the $lookup aggregate stage in meteor mongo using aggregate and reactive-aggregate. Unfortunately I am getting this error.

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.

Edit: 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

mongo

link.bat

start "google chrome" http://localhost:3000

回答1:


The problem is that meteor's default mongo is pinned at 2.6.7 (at 1.3 version meteor).

Set your mongo url to a 3.2 database to use lookup

$ MONGO_URL=mongodb://localhost/meteor meteor

(where mongo url points to a 3.2 db)



来源:https://stackoverflow.com/questions/37122518/why-cant-i-use-lookup

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!