Lab1 Validation

Hi,
As mentioned in the Lab 1 the number of documents matching all conditions as 23, but i am getting total number of documents as 24. Due to this when i run a validation script i am getting below shown error

MongoDB Enterprise Cluster0-shard-0:PRIMARY> validateLab1(pipeline)

You aren’t returning the correct number of documents

Any one facing same issue?

Thanks
Naveen

Hi,

Please check your language filter, you must select documents including both “Japanese” and “English”. There is an array operator very handy for this.

José Carlos

Thanks Was able to solve.

Good work! Glad you managed to solve it!

Also for me the result is 24 (even considering the operator $all on languages filter)

Hi,

Just checked this and got 23 documents. I would suggest to review how you are filtering by genres and rated. Please note that the resulting documents must be rated as PG or G, must include both Japanese and English, Crime and Horror should not be in genres, and "imdb.rating" must be greater or equal than 7. You have one document in your result which breaks one of these requirements.

José Carlos

OK. The error was in genres (after check one by one…! of 24 documents). Thank you

Glad you found the error. Well done!