Chapter 3, Lab - Using $lookup - Confusing question

The question is confusing, needs a hint.

For the air_routes.airplane, I though it was a single word value. So, I did my query like:

$match: {
    "airplane":  { $in: ["747", "380"] }

I got wrong answer obviously. I was stuck here because I knew the query was correct (at least, the rest of the query except the match part).
I soon found out air_routes.airplane could contain multiple values, space-limited like: “319 CRJ”.

So the correct query was:

$match: {
    "airplane": /747|380/

I got so frustrated because I almost failed the lab for no reason.

So, I suggest add a hint so people don’t fail this for such a stupid detail.

Hint: air_routes.airplane can contain multiple, space-separated values.

Hi @Ergis_Gjergji, welcome to the community. :wave:
Thanks for your feedback, I will forward this to our curriculum team and we will try to release a suitable fix for the same, as soon as possible.

Thanks and Regards,
Sourabh Bagrecha,

1 Like