incubator-couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Robert Newson <robert.new...@gmail.com>
Subject Re: Descending dates per username
Date Tue, 10 May 2011 19:53:48 GMT
Reverse your startkey and endkey values if you use descending=true
(it's logical if you think about it).

B.

On 10 May 2011 20:42, Matthias Eck <matthias.eck@jibbigo.com> wrote:
> Hello,
>
> I am having the following issue with CouchDB:
>
> My view outputs an array key made up of a username and a timestamp:
> emit([doc.user, doc.timestamp]).
> I would like to use the view to get all docs for a specific user
> sorted by timestamp, with the newest documents first.
>
> Using ...?startkey=["user"]&endkey=["user",{}] works fine, but sorts
> the docs in the wrong order.
> Now adding &descending=true gives an empty result.
>
> Thanks for any help,
> Matthias
>

Mime
View raw message