gpt4 book ai didi

node.js - AWS-DocumentDB 不支持 $lookup 运算符,AWS-DocumentDB 中 $lookup 的任何替代方案

转载 作者:搜寻专家 更新时间:2023-10-31 23:22:53 30 4
gpt4 key购买 nike

DocumentDB 不支持“$lookup”运算符,DocumentDB 中 $lookup(MongoDB) 的任何其他替代方案。

这是 DocumentDB 支持的运算符列表。 https://docs.aws.amazon.com/documentdb/latest/developerguide/mongo-apis-aggregation-pipeline.html

将 Nodejs 应用程序从 MongoDB 迁移到 DocumentDB,数据迁移成功但在运行应用程序时出现此错误。

{ MongoError: Aggregation stage not supported: '$lookup'
at Connection.<anonymous> (/.../node_modules/mongoose/node_modules/mongodb-core/lib/connection/pool.js:443:61)
at emitTwo (events.js:126:13)
at Connection.emit (events.js:214:7)
at processMessage (/.../node_modules/mongoose/node_modules/mongodb-core/lib/connection/connection.js:364:10)
at TLSSocket.<anonymous> (/.../node_modules/mongoose/node_modules/mongodb-core/lib/connection/connection.js:533:15)
at emitOne (events.js:116:13)
at TLSSocket.emit (events.js:211:7)
at addChunk (_stream_readable.js:263:12)
at readableAddChunk (_stream_readable.js:250:11)
at TLSSocket.Readable.push (_stream_readable.js:208:10)
at TLSWrap.onread (net.js:607:20)
ok: 0,
errmsg: 'Aggregation stage not supported: \'$lookup\'',
code: 304,
name: 'MongoError',
[Symbol(mongoErrorContextSymbol)]: {} }

最佳答案

[10 月 16 日更新] Amazon DocumentDB 如何支持 $lookup:https://aws.amazon.com/about-aws/whats-new/2019/10/amazon-documentdb-add-additional-aggregation-pipeline-capabilities/

您可以在此处找到支持的 API/阶段/运算符的最新列表:https://docs.aws.amazon.com/documentdb/latest/developerguide/mongo-apis.html

另外,请检查以下最近发布的内容:https://aws.amazon.com/documentdb/resources/

关于node.js - AWS-DocumentDB 不支持 $lookup 运算符,AWS-DocumentDB 中 $lookup 的任何替代方案,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/56111625/

30 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com