views:

35

answers:

0

hello, i have the problem with MapReduce and complex date ranges:

i have database entries like this:

{ name: x, ranges: [ {from: 2010-1-1, to: 2010-1-15}, {from: 2010-1-17, to:2010-1-20}, ] } ...

now i want to query which documents fit into the range: 2010-1-10 to 2010-1-18.

i am totally stuck on this because every couchdb example for dates only cares about "the blog entry date". i understand that fully but when it comes to: query multiple date ranges for a certain date range mapReduce isn't that flexible is it?