mars icon indicating copy to clipboard operation
mars copied to clipboard

$Lookup(聚合)中缺少实现方法

Open WhaleFalls0807 opened this issue 2 years ago • 0 comments

在执行聚合操作时,$lookup内部的pipeline没有实现方法

预期执行的语句 db.orders.aggregate( [ { $lookup: { from: "warehouses", let: { order_item: "$item", order_qty: "$ordered" }, pipeline: [ { $match: { $expr: { $and: [ { $eq: [ "$stock_item", "$$order_item" ] }, { $gte: [ "$instock", "$$order_qty" ] } ] } } }, { $project: { stock_item: 0, _id: 0 } } ], as: "stockdata" } } ] )

WhaleFalls0807 avatar May 17 '22 11:05 WhaleFalls0807