Lab1 $match m121

var pipeline = [
    {
        $match: {
            'imdb.rating': { $gte: 7 },
            'genres': { $nin: ['Crime', 'Horror'] },
            'rated': { $in: ['PG', 'G'] },
            $and: [{ 'languages': 'English' }, { 'languages': 'Japanese' }]
        }
    }
]

and db.movies.aggregate(pipeline).itcount() returns me zero (0).

I have tried with and $and condition also.

@lovch Welcome to MongoDB Developer Community, You can ask MongoDB Courses related questions in MongoDB University Courses,

If you are looking for the answer, my suggestion is to read the proper definition and for the better idea see the video tutorial again.

1 Like

Other MongoDB Topics - MongoDB Developer Community Forums is where no-one replies and also for the sake of community, not posting the answer here is fine for me.
can you DM the answer if you know it? I’ve already wasted a day on it
I can provide you with my contacts.

Hi @lovch,

It looks like you have several replies with some hints on your discussion topic in the MongoDB University forum. As @turivishal noted, the course-specific forum is the most appropriate channel for discussion of questions specific to MongoDB University courses and assignments.

Generally you will get hints rather than direct answers for assignments or exam answers. There should be enough information and references in the learning materials to cover the learning objectives, but please share your feedback there on potential improvements or clarification needed. Our curriculum engineering team also monitors the university forums and incorporates feedback into course updates.

Regards,
Stennie

1 Like

Be aware that some of us are present in both forums. And what you wrote above is simply not true.

2 Likes