views:

26

answers:

1

The following line works:

Analytic.collection.map_reduce(map, reduce).find

but is there a way to do

Analytic.collection.find('page_type' => 'products').map_reduce(map, reduce).find

and even filter a date range such as date >= "2010-08-01" and date <= "2010-08-31"?

+1  A: 

Use the query option (see http://www.mongodb.org/display/DOCS/MapReduce#MapReduce-Overview). Any normal query will work, so yes, you can do a date range.

kristina