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 -

Add new record to the table by click on the button in Microsoft Access -

javascript - jQuery .height() return 0 when visible but non-0 when hidden -