On Fri, Jul 3, 2009 at 9:37 AM, Geoff Buesing<[email protected]> wrote: > On Fri, Jul 3, 2009 at 6:59 AM, Robert Newson <[email protected]>wrote: > >> wouldn't emitting the start timestamp as the key solve the problem? >> (if you need both, have two views). > > > That would just return upcoming events, it wouldn't return current events > that have already started but have yet to end. >
The pattern used on http://jchrisa.net/cal/_design/cal/index.html is to emit once an hour for every hour the event is active, this way you can always query for current events (use 15 minutes or 1 minute granularity if that fits your model better) > I think you could do this with couchdb-lucene, though, something like: > > q=starttime:[current_time TO far_future_time] OR endtime:[current_time TO > far_future_time] > &sort=starttime > -- Chris Anderson http://jchrisa.net http://couch.io
