Database Reference
In-Depth Information
def
def
h_aggregate
(
icollection
,
ocollection
,
mapf
,
cutoff
,
last_run
):
query
=
{
'value.ts'
: {
'$gt'
:
last_run
,
'$lt'
:
cutoff
} }
icollection
.
map_reduce
(
map
=
mapf
,
reduce
=
reducef
,
finalize
=
finalizef
,
query
=
query
,
out
=
{
'reduce'
:
ocollection
.
name
,
'sharded'
:
True
})