Now I have a pretty big set of analytics , each in it's own document . I run a map/reduce that reduces them to a aggregated set like this :
Takes a start key and end key (time start and time end) and returns the following
{"apps":{"unknown":6,"Samsung Gear":2},"countries":{"united states":6,"canada":1,"Mexico":1},"ratings":2,"rates":3,"total_count":8}}
Now the problem is say I was to get data for 7 days after each other . If I provide a Start (7days ago) and (today) I get one aggregated array - so I am forced to query 7 times , with the start and end of each day. Is there any better way to construct the map reduce ?