couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dave Cottlehuber <>
Subject Re: view that gets all entries between start and end date that are different variables
Date Tue, 07 Jun 2011 07:04:43 GMT
On 7 June 2011 16:34, Jacob Fenwick <> wrote:
> I want something that reproduces this SQL query in couchdb:
> SELECT * WHERE [start timestamp] >= doc.start AND [end timestamp] < doc.end;
> I know this has probably been asked many times before.
> In fact, here's someone asking it on StackOverflow:
> Supposedly this is an answer but I've tried it and it doesn't seem to work:
> Is this just not possible in couchdb without something like couchdb-lucene?

If you want intersection of set A and set B, you'll need to either do
it client side, or use lucene (for when you need both Foo AND Bar)...

Heres a good client-side example - using reduce to minimise the # of
records retrieved - and for bonus points a segueway into lucene at the


View raw message