M121 Chapter 1 Lab - Computing Fields confusing

Don’t want to give too much away, but the question clearly states;

“Using the Aggregation Framework, find a count of the number of movies that have a title composed of one word”

Assuming all else is correct, if “type”: “movie” criteria is included, then the result is not one of those listed in multiple choice lab answers.

Lost some time over this…

Hi @Paul_33440,

Hint: Try to check the type of title field and filter on the size of movie title to find all the movies that have a title composed of one word.

If you still have any doubt, please let me know and we can debug your query in discourse personal messages.


Thanks Sonali,

I had actually got the right answer before I posted the above. It just took me a while longer because I included “type”: “movie” as a $match filter due to the apparent requirement to “… count the number of movies…” This is the part that “confused” me, because the returned number of documents was a little lower than the correct choice. Removing the “type”: “movie” filter gave me one of the listed numbers in the Lab, which turned out to be the right one.

Perhaps I overthought the question, but thought this might act as a warning to others because there are documents that are not movies, and for the purposes of this exercise it appears that they need to be counted to get the correct anwser.