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 <[email protected]> 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 >
