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

SPSS keyboard combination alters encoding -

Socket.connect doesn't throw exception in Android -

iphone - How do I keep MDScrollView from truncating my row headers and making my cells look bad? -