couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From He Shiming <>
Subject Re: Views, lookup by a key, then sort by another one?
Date Thu, 06 Jan 2011 14:26:10 GMT
> View results are sorted by key, so you must use complex keys (arrays) to add
> the updated_at field in your keys.
> Then you will be able to query the view for a date range with the startkey
> and endkey parameters.
> see also
> and
> Martin

Thanks Martin. I actually read those. The key can be a JSON array.
However, in my situation I only wanted to sort by the date, I didn't
really want to specify a date in the first type query. Do you have an
example of what this complex key should look like when querying?

Best regards,
He Shiming

View raw message