Lab1 : "A pipeline stage specification object must contain exactly one field.",

Hello,

When I run the pipeline I see this error :

<deleted>
MongoDB Enterprise Cluster0-shard-0:PRIMARY> db.movies.aggregate(pipeline).itcount()
uncaught exception: Error: command failed: {
        "operationTime" : Timestamp(1600607950, 1),
        "ok" : 0,
        "errmsg" : "A pipeline stage specification object must contain exactly one field.",
        "code" : 40323,
        "codeName" : "Location40323",
        "$clusterTime" : {
                "clusterTime" : Timestamp(1600607950, 1),
                "signature" : {
                        "hash" : BinData(0,"VoRXLB9YRwG6bFgmcDsVpN+Ump0="),
                        "keyId" : NumberLong("6829321948548300802")
                }
        }
} : aggregate failed :   

you are closing the match stage too soon with the closing parenthesis right before rated.

Thanks,

I think I give up

<deleted>
MongoDB Enterprise Cluster0-shard-0:PRIMARY> db.movies.aggregate(pipeline).itcount()
uncaught exception: Error: command failed: {
        "operationTime" : Timestamp(1600609920, 1),
        "ok" : 0,
        "errmsg" : "unknown operator: $or",
        "code" : 2,
        "codeName" : "BadValue",
        "$clusterTime" : {
                "clusterTime" : Timestamp(1600609920, 1),
                "signature" : {
                        "hash" : BinData(0,"bRXzNfYA0jrKvLO/dPX/GePNrCY="),
                        "keyId" : NumberLong("6829321948548300802")
                }
        }
} : aggregate   

The pipeline made with compass and still not working :

tch
<deleted>
MongoDB Enterprise Cluster0-shard-0:PRIMARY> db.movies.aggregate(pipeline).itcount()
uncaught exception: Error: command failed: {
        "operationTime" : Timestamp(1600613077, 8),
        "ok" : 0,
        "errmsg" : "A pipeline stage specification object must contain exactly one field.",
        "code" : 40323,
        "codeName" : "Location40323",
        "$clusterTime" : {
                "clusterTime" : Timestamp(1600613077, 8),
                "signature" : {
                        "hash" : BinData(0,"TxKcBOenLcJTyDV4n9mbuiVm+Uw="),
                        "keyId" : NumberLong("6829321948548300802")
                }
        }
} : aggregate failed :  

Hi @Roelof_Wobben,

I have suggested some corrections in your aggregation pipeline. Check your discourse inbox messages and feel free to reply their with corrected aggregation pipeline if you still have any doubts.

Please let me know if you have any additional questions.

Note: I have edited your posts to remove aggregation pipelines as it might be spoiler for other MongoDB University users.

Thanks,
Sonali