incubator-couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mano <>
Subject Re: parametrized view generation
Date Wed, 10 Feb 2010 05:56:45 GMT
On Wed, Feb 10, 2010 at 11:14 AM, madhav sharma <
> wrote:

> hi everyone
> I am couchdb for one of my project and i am stuck at a place where i need
> your help.
> My use case of problem is that i have a set of documents which have same
> field with different value and i need to get the value of  field (say name)
> from a document with id (say information) , and i want this mapfunction to
> be generic so that i can call this with different document id and get the
> the field value out of it.
> In sql it can just be(  select name from Table where id = 1233 )  so any
> help is appreciated

The map function can:

emit( [, doc._id], doc).

You can query this view with a 'key' of [name, 1233].


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