Not returnig the current number of documents

Hi im getting this error “You aren’t returning the correct number of documents” while doing validateLab1(pipeline)


That indicates that your pipeline is not correct. Go over the results again to correct your problem. Note the helpful hint in the Lab that says

As a hint, your aggregation should return 23 documents. You can verify this by typing db.movies.aggregate(pipeline).itcount()

1 Like

Actually I think someone else added a new document … I’m getting 24 documents, I just read all filtered document one by one in each on fit the pipeline / filter.

Can I post my solution in order to check that it’s correct?

Hey @Michael_M_37276,

I doubt that anyone has added an extra document just to trick you :slight_smile:

Someone else had the same problem as you and it turned out the genres filter was still including Horror. This could be the same in your case or your filter(s) is/are wrong somewhere, so suggest you have another look and try to figure it out.