Closed
Description
Hello
I'm interested how to run this query
db.parties.group({
key: { start: 1 },
cond: { start: { $gt: new Date( '01/01/2012' ) } },
$reduce: function ( curr, result ) { result.count++ },
initial: { count : 0 }
});
I tried with
MapReduceCommand command = new MapReduceCommand(Party.col(), "{ start: 1 }", "function ( curr, result ) { }", "count", MapReduceCommand.OutputType.REPLACE, null);
MapReduceOutput output = Party.col().mapReduce(command);
But I always get 0 results. Any ideas how to make it work?
Metadata
Assignees
Labels
No labels