Lab - Computing Fields Approach

I’ve passed the lab after a while (…), however …

Maybe It is because of the way pipelines are being connected, there must be restrictions I still don’t know, Can anybody explain why the following is not working?:

db.movies.aggregate([{ $addFields: { myTitle_split: { $split: ["$title", " "] } } }, { $project: { “_id”: 0, “title”: 1, “myTitle_split”: 1 } }, { $unwind: { “path”: “$myTitle_split”, “includeArrayIndex”: “my_index” } }, { $match: { “my_index”: 0 } }]).itcount()

Thanks and good luck!

Hey @g41
What do you mean by it is not working? I got an answer returned with no error… It return a 5 digit number.

And the good luck part should be for you :slightly_smiling_face:

Hello @natac13,

I mean, the query works(sorry for the confusion …my bad), but the result is incorrect,
I will double check the pipeline stages this week,
There’s something wrong and I’m curious about it.

Thank you!