incubator-couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Pavan Kumar <tvpa...@gmail.com>
Subject MultiKey sorting in views
Date Tue, 13 Apr 2010 04:03:09 GMT
Hi,

  I have documents with author and submitted time ( utc value of date )
fields . Now i need to sort descending ( i.e latest first ) on time and
filter by author in a view.

I tried a few things like given below but they don't work. My "view"
knowledge needs lot of catching up.. Any pointers would help..

1) Filters by author but doesn't sort by time

startkey: [ author , 0 ]
endkey : [ author, now ]
descending : true

Map:
emit([doc.author,doc.submit_at],doc )


2) Doesn't filter by author !! :(

startkey: [ 0 , author ]
endkey : [ now, author ]
descending : true

Map: emit([doc.submit_at,doc.author],doc )

regards,
Pavan

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message