Hi,
I have got an error while creating a $match pipeline for the below question:
- imdb.rating is at least 7
- genres does not contain “Crime” or “Horror”
- rated is either “PG” or “G”
- languages contains “English” and “Japanese”
I have got the filtered records when i try this command:
db.movies.aggregate( [ {$match: {$nor: [ {genres: “Crime”}, {genres:“Horror”} ], $and: [ {languages:“English”}, {languages: “Japanese”} ] } } ] )
count: 533
but, when use the complete filter command my count is getting increased:
db.movies.aggregate( [ {$match: {$nor: [ {genres: “Crime”}, {genres:“Horror”} ], $and: [ {languages:“English”}, {languages: “Japanese”} ], { “imdb.rating” : {$gte:7} } } ] )
could anyone check and provide an update?