MongoDB Aggregate Functions -


i trying group on mongodb collection (my version 2.2.2)

db.stream.aggregate({$group: { myid:"a1"}}) 

but following error:

19 11:56:20 typeerror: db.stream.aggregate not function (shell):1 

many thanks,

you must using 2.2.+ version of shell able use aggregate helper.

you can check shell version version() command @ shell prompt.

in addition, aggregation syntax incorrect - $group operator must set field called _id (you have myid) tells field aggregating by.


Comments

Popular posts from this blog

.htaccess - First slash is removed after domain when entering a webpage in the browser -

Socket.connect doesn't throw exception in Android -

SPSS keyboard combination alters encoding -