On Wed, Jan 7, 2009 at 12:03 AM, paul jobs <[email protected]> wrote: > function(d) { > if (d.type!="reply") > emit([d.fromuid,d.touid,d.replycount],d); > } > > is it possible to use this map function > to prepare views > > like fromuid ==uid or touid ==uid and d.replycount>0 using couchdb view keys
No, you've got to remember to that all a map function does is build a sorted list. All queries do is pull out sections of that list. So you can have a list sorted by first name, or a list sorted by last name, or a sorted by first, last, or a list sorted by last, first. If you need to query by first, last as well as last, first -- you're going to need 2 views. Hope that helps -- Chris Anderson http://jchris.mfdz.com
