incubator-couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Chris Anderson" <jch...@gmail.com>
Subject Re: select where
Date Wed, 07 Jan 2009 16:43:41 GMT
On Wed, Jan 7, 2009 at 12:03 AM, paul jobs <webjogger@gmail.com> 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

Mime
View raw message