incubator-couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Volker Mische <>
Subject Re: View collation
Date Sat, 13 Dec 2008 11:23:15 GMT

I could of course drop the comments I don't want on the application
side. The point is that I only want to have the comments of a certain
date range returned, not all of them.


Simon Metson wrote:
> Hi
> The 0 or 1 is arbitrary, so long as the child document has a higher
> number than the parent you are ok. If you express your date as a number
> you could use that instead of the 0 and 1, I think, to see all posts in
> a date range. The problem is you would get orphaned comments, but I
> think it's easier to drop them in the application.
> Hope that helps
> Simon
> This is coming from my iPhone, please see if you feel
> this mail is rather short
> On 13 Dec 2008, at 11:00, Volker Mische <> wrote:
>> Hi,
>> I've read about view collation in cmlenz' blog
>> ( The problem I
>> have at the moment is similar, but I need an additional feature. I'd
>> like to have a view that returns the blog entry along with all comments
>> of a certain time range.
>> A query would look like:
>> ...?startkey=["myslug", 0, 20081201]&endkey;=["myslug", 2, 20081212]
>> The problem is that the entry might have been posted in November, thus
>> it doesn't contain a date within that range. Is there a way that the
>> entry will be returned though without the need of 2 GET requests (one
>> for the entry, one for the comments).
>> Cheers,
>>  Volker

View raw message