incubator-couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Wout Mertens <wout.mert...@gmail.com>
Subject Re: Question about views
Date Tue, 28 Apr 2009 11:46:07 GMT
On Apr 28, 2009, at 12:04 PM, umut utkan wrote:

> Actually what I want  is to pass custom query parameters --other  
> than the
> ones explained in HTTP view API--
> to my views so that I can use them in map/reduce functions.

Oh. That won't work, since map and reduce functions should always give  
the same answer for a given set of documents.

You can output different results for predefined questions, because the  
key of the view can be an array. For example, you could sort on last  
name and first name in the same view by emitting ([0,doc.first],doc)  
and ([1,doc.last],doc) (although 2 views would be better).

Can't you give a very concrete example of what you're trying to achieve?

Wout.
Mime
View raw message