-
Notifications
You must be signed in to change notification settings - Fork 31
Open
Description
this is my code
(defjs map_category()
(emit this.category 1))
(defjs sum_games(c vals)
(return ((@ Array sum vals))))
(defun sum-by-category ()
(cl-mongo:pp (cl-mongo:mr.p ($map-reduce "game" map_category sum_games))))
when I execute sum-by-category, it returns nil
RETRO-GAMES> (sum-by-category)
NIL
RETRO-GAMES>
but when I run the same code directly in the mongodb,
> db.game.mapReduce(map_category, sum_games, {out: "map_reduce_example"})
{
"result" : "map_reduce_example",
"timeMillis" : 6,
"counts" : {
"input" : 3,
"emit" : 3,
"reduce" : 1,
"output" : 2
},
"ok" : 1,
}
> db.map_reduce_example.find()
{ "_id" : "Classic", "value" : 1 }
{ "_id" : "Strategy", "value" : 2 }
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels