为什么我不能使用$ lookup? [英] Why can't I use $lookup?

查看:167
本文介绍了为什么我不能使用$ 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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆