couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jehan Bihin <squellett...@gmail.com>
Subject Re: View to find someone in a list in a document
Date Wed, 02 Sep 2009 17:12:49 GMT
Hi Simon,

Thanks for your help.

I need the document if the key is present in the list.

Thanks,

Jehan


2009/9/2 Simon Metson <simonmetson@googlemail.com>

> Hi,
>        Do you mean you want to emit each user as a key? Something like:
>
> function(doc) { for (v in doc.users) { emit(doc.users[v], doc); }
>
> as a map would do that.
> Cheers
> Simon
>
>
> On 2 Sep 2009, at 17:25, Jehan Bihin wrote:
>
>  Hi all,
>>
>> (sorry for my english)
>> I have a document having a list of persons :
>>
>> ...
>> "users":{"membre-joouul_hotmail.com":["createur"],"membre-
>> killan_daaboo.net
>> ":["moderateur"]}
>> ...
>>
>> Each persons have some roles.
>> My key is the membre like 'membre-joouul_hotmail.com'
>> And i want to list all document having my key present in the users list.
>>
>> Is it possible and correct to have it ?
>> Can you guide me ? After reading here and the site I found nothing talking
>> on that.
>>
>> Thanks in advance,
>>
>> Jehan
>>
>
>

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