Chapter 1 $match homework 1 extra record returned

I think I have the pipeline set up correctly but mongo returns an extra record. My query on the “genres” is “$and”: [{“genres”: {"$ne": “Crime”}}, {“genres”: {"$ne": “Horror”}}]. However, “Crime” is still returned. I found the offending record:
“_id” : ObjectId(“573a13e7f29313caabdc8bb0”),
“title” : “Mr. Holmes”,
“year” : 2015,
“runtime” : 104,
“released” : ISODate(“2015-07-17T00:00:00Z”),
“cast” : [
“Ian McKellen”,
“Laura Linney”,
“Milo Parker”,
“Hiroyuki Sanada”
“metacritic” : 67,
“poster” : “”,
“plot” : “An aged, retired Sherlock Holmes looks back on his life, and grapples with an unsolved case involving a beautiful woman.”,
“fullplot” : “The story is set in 1947, following a long-retired Holmes living in a Sussex village with his housekeeper and rising detective son. But then he finds himself haunted by an unsolved 30-year old case. Holmes memory isn’t what it used to be, so he only remembers fragments of the case: a confrontation with an angry husband, a secret bond with his beautiful but unstable wife.”,
“awards” : “1 win & 1 nomination.”,
“lastupdated” : “2015-09-10 17:50:35.553000000”,
“type” : “movie”,
“languages” : [
“directors” : [
“Bill Condon”
“writers” : [
“Mitch Cullin (novel)”,
“Jeffrey Hatcher (screenplay)”
“imdb” : {
“rating” : 7.4,
“votes” : 8033,
“id” : 3168230
“countries” : [
“rated” : “PG”,
“genres” : [

Nevermind. I found my error! I was missing an “$and” around all of the filters. I still don’t understand what I should do with the question. What doesn’t it ask because the total records return is 23 which is not in any of the answers?

Hi @Dexter_99715,

Please check the lab requirements. After you have verified the count of documents, you need to load validateLab1.js into mongo shell:


Then run the validateLab1 validation method as below:


Please let me know, if you have any questions.


Thank you for helping me! I did load validateLab1.js. The result waws true. That’s why I don’t understand what that assignment asks for