MongoDB: Need to match two fields in a lookup
I've indexed nuit, regNumber and _id for a faster query. You can find sample data and a solution which i'm not happy with because using $unwind and $lookup makes it iterate a million documents: https://mongoplayground.net/p/jR4Y-9-5As7 This is what i did:…