Return-Path: Delivered-To: apmail-couchdb-user-archive@www.apache.org Received: (qmail 39447 invoked from network); 2 Sep 2009 17:13:19 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 2 Sep 2009 17:13:19 -0000 Received: (qmail 46945 invoked by uid 500); 2 Sep 2009 17:13:18 -0000 Delivered-To: apmail-couchdb-user-archive@couchdb.apache.org Received: (qmail 46889 invoked by uid 500); 2 Sep 2009 17:13:17 -0000 Mailing-List: contact user-help@couchdb.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@couchdb.apache.org Delivered-To: mailing list user@couchdb.apache.org Received: (qmail 46879 invoked by uid 99); 2 Sep 2009 17:13:17 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 02 Sep 2009 17:13:17 +0000 X-ASF-Spam-Status: No, hits=2.2 required=10.0 tests=HTML_MESSAGE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of squellettore@gmail.com designates 209.85.220.227 as permitted sender) Received: from [209.85.220.227] (HELO mail-fx0-f227.google.com) (209.85.220.227) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 02 Sep 2009 17:13:11 +0000 Received: by fxm27 with SMTP id 27so1113323fxm.11 for ; Wed, 02 Sep 2009 10:12:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:reply-to:in-reply-to :references:date:message-id:subject:from:to:content-type; bh=9UfkQn6qWP9U7ehWGOub1FW81cRZbnVfGRN1jYXAoR8=; b=UwxG7lRrMZm5Sn5MTq9ctMTeNUc7TnM6J1tgC3DoBrTe3EBmydY6UYglQR7qTig80w Wk1xf1uR6yaDPQW0ltSVXqNHGBLS8WLnGNY+j+voBbaw73JfXLd3RbQgKo6U4pUhvFBz 5UoLHqfX+KiM00qu/g5DtmfxNsJWgMeXP7SR8= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:reply-to:in-reply-to:references:date:message-id :subject:from:to:content-type; b=pnmQUpmSsQT8nxepYKLSfXyiYZ9c1rkTwwB7DzI2ugDbezXJbZk9wzJtyVwu88jDSw aJK7oTTy408D38zu2QDzCR69k///3TnoFXf6dCLYhp2DS+ECKpC0UX1Zh0mgl7nuk5Qz FgGjXo5GnXagHhjWaCrhd54upTaTGELMdUUQw= MIME-Version: 1.0 Received: by 10.103.127.32 with SMTP id e32mr3676236mun.70.1251911569790; Wed, 02 Sep 2009 10:12:49 -0700 (PDT) Reply-To: killan@daaboo.net In-Reply-To: <9BE6119F-6D55-4293-B209-9D23F7A33484@googlemail.com> References: <51d0803c0909020925s75bdc063gd108f8c5618ca38c@mail.gmail.com> <9BE6119F-6D55-4293-B209-9D23F7A33484@googlemail.com> Date: Wed, 2 Sep 2009 19:12:49 +0200 Message-ID: <51d0803c0909021012q5f8c1f6eu95be9cdd6e87deed@mail.gmail.com> Subject: Re: View to find someone in a list in a document From: Jehan Bihin To: user@couchdb.apache.org Content-Type: multipart/alternative; boundary=0016364d21a768581804729b6079 X-Virus-Checked: Checked by ClamAV on apache.org --0016364d21a768581804729b6079 Content-Type: text/plain; charset=ISO-8859-1 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 > 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 >> > > --0016364d21a768581804729b6079--