mongodb-js / compass

The GUI for MongoDB.
https://mongodb.com/compass
Other
1.15k stars 176 forks source link

Unable to use " $accumulator" operator in "$groupby" stage in aggregate query #2176

Closed khvr000 closed 3 years ago

khvr000 commented 3 years ago

Bug Report

Current Behavior

I wrote a query involving $accumulator and ran it in robo 3t as well as Mongo DB Compass

In Robo 3t when I run Query it says that "ok" : 0, "errmsg" : "unknown group operator '$accumulator'", "code" : 15952, "codeName" : "Location15952" robo3t error

Even in Mongo Db Compass

unknown group operator '$accumulator' mongoCompass

Code/Gist

Expected Behavior/Code

Environment

Possible Solution

Please help me if Im not using latest version of these tools or some other problem

Additional Context/Screenshots

addaleax commented 3 years ago

Which mongodb server version are you using? $accumulator is a new feature in 4.4, and the error message is what you would get if you ran it against a server with a lower version.