Hi im just wrapping up M121 and working on the last question. I am trying to use graphlookup but am just getting an empty array. I was able to run $match and $lookup independent and get back routes with correct src/dst and their alliance/ Can it be done with just $graphLookup?
db.air_routes.aggregate([
{$graphLookup: {
from: 'air_alliances',
startWith: '$airlines',
connectFromField: 'airlines',
connectToField: 'airline.name',
as: 'carriers',
maxDepth: 0,
restrictSearchWithMatch: {
src_airport: {$in: ["LHR", "JFK"]},
dst_airport: {$in: ["LHR", "JFK"]}
},
}},
])