incubator-couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Simon Metson <>
Subject Re: View collation
Date Sat, 13 Dec 2008 11:17:29 GMT
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

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