Currently mongodb $lookup only compare single local and foreign key.
But if you want to perform a query as like mysql left join with two or more filed then below is solution.
db.getCollection('LeftTable').aggregate([
{
$lookup:
{
from: "RightTable",
localField: "ID",
foreignField: "ID",
as: "RightTableData"
}
},
{$unwind :"$RightTableData" },
{
$project: {
mid: { $cond: [ { $eq: [ '$MID', '$RightTableData.MID' ] }, 1, 0 ] }
}
},
{$match : { mid : 1}}
])
Here $MID is LeftTable MID field.