From user-return-11682-apmail-couchdb-user-archive=couchdb.apache.org@couchdb.apache.org Sun Jul 25 18:53:50 2010 Return-Path: Delivered-To: apmail-couchdb-user-archive@www.apache.org Received: (qmail 19037 invoked from network); 25 Jul 2010 18:53:50 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 25 Jul 2010 18:53:50 -0000 Received: (qmail 46914 invoked by uid 500); 25 Jul 2010 18:53:48 -0000 Delivered-To: apmail-couchdb-user-archive@couchdb.apache.org Received: (qmail 46855 invoked by uid 500); 25 Jul 2010 18:53:48 -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 46847 invoked by uid 99); 25 Jul 2010 18:53:48 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 25 Jul 2010 18:53:48 +0000 X-ASF-Spam-Status: No, hits=2.9 required=10.0 tests=FREEMAIL_FROM,HTML_MESSAGE,RCVD_IN_DNSWL_NONE,SPF_NEUTRAL,T_TO_NO_BRKTS_FREEMAIL X-Spam-Check-By: apache.org Received-SPF: neutral (nike.apache.org: local policy) Received: from [87.248.110.139] (HELO n22.bullet.mail.ukl.yahoo.com) (87.248.110.139) by apache.org (qpsmtpd/0.29) with SMTP; Sun, 25 Jul 2010 18:53:37 +0000 Received: from [217.12.4.215] by n22.bullet.mail.ukl.yahoo.com with NNFMP; 25 Jul 2010 18:53:16 -0000 Received: from [87.248.110.206] by t2.bullet.ukl.yahoo.com with NNFMP; 25 Jul 2010 18:53:16 -0000 Received: from [127.0.0.1] by omp236.mail.ukl.yahoo.com with NNFMP; 25 Jul 2010 18:53:16 -0000 X-Yahoo-Newman-Property: ymail-3 X-Yahoo-Newman-Id: 163810.81911.bm@omp236.mail.ukl.yahoo.com Received: (qmail 49439 invoked by uid 60001); 25 Jul 2010 18:53:15 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.co.uk; s=s1024; t=1280083995; bh=2YlIMSgMYfDBsjzEKg8nMdBc3pFE7AuWre9CsZwBaTg=; h=Message-ID:X-YMail-OSG:Received:X-Mailer:References:Date:From:Subject:To:In-Reply-To:MIME-Version:Content-Type; b=FUbd54yXQtcearRYXmRQiN/ymKiNF0U5Hu8rz8nFBUVQ1HcSZDVbwDGanAis5niVS6v0i20vzkE2qTMMhIzCoMLZImSSTHoCrOO2A+AIgy2KXVy6Hzn/0iaSNvuyJNkvbkU4urbCuUdzXW7/MJ+hIHXaF8imvab7vtnwat3ffto= DomainKey-Signature:a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.co.uk; h=Message-ID:X-YMail-OSG:Received:X-Mailer:References:Date:From:Subject:To:In-Reply-To:MIME-Version:Content-Type; b=PoKbA+mEMqg/TKp9h61JKRik+ocrCvg8MMxXCeBt0puJ4y/UaVCb0fjLRX9R/+eQ20NqRuLyE2AwVmQVHrLzSq9/CPnpM1WIPE5cMfOhCX+kGaPCGeAS5J2nclohXtie1l1az/Sys+0f9g205SeFRwCDU9B5O8ALDBFO9yjRuNo=; Message-ID: <900959.48480.qm@web29214.mail.ird.yahoo.com> X-YMail-OSG: s4g_LjkVM1nETxIs291eoDt2_6lE_Y6EHv01m9UlMFNr2Kj 36JWbpbfV_f45oaylA8ykAH_lTpZXO.X1DPJV4bWJ8.AS7JTT7UqL7QmobwS 4AregRHxbJHiQlrLHoW_BXomA0JAq0K7c84rfYcBjl9hxb2MlWl5EnlOGZ3E 49D3jKhk8pGC_2z.uVd1HDDeaK7XC1dhU68d9KdS.qIKQ9zOOMc.4bMdFYew a40Kpq_mCKlzmghyQnUVxEPyz_8.kD.6q.KYsZeSlu_iHU1.7FcSlKjpRuNi e Received: from [86.149.64.78] by web29214.mail.ird.yahoo.com via HTTP; Sun, 25 Jul 2010 18:53:15 GMT X-Mailer: YahooMailRC/420.4 YahooMailWebService/0.8.104.276605 References: <100996.42203.qm@web29217.mail.ird.yahoo.com> Date: Sun, 25 Jul 2010 18:53:15 +0000 (GMT) From: Joe Bloggs Subject: Re: My first few days of using couchdb To: user@couchdb.apache.org In-Reply-To: MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="0-968952496-1280083995=:48480" X-Virus-Checked: Checked by ClamAV on apache.org --0-968952496-1280083995=:48480 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Thanks, this seems to be best approach..=0A=0A=0A=0A=0A____________________= ____________=0AFrom: J Chris Anderson =0ATo: user@couchdb= .apache.org=0ASent: Sun, 25 July, 2010 18:49:37=0ASubject: Re: My first few= days of using couchdb=0A=0A=0AOn Jul 25, 2010, at 10:18 AM, Joe Bloggs wro= te:=0A=0A> I have been impressed with couchdb so far but I have now hit the= first problem =0A=0A> that I cannot see how to resolve easily.=0A> =0A> I = have a few test documents with a photo attached to each. I want to tag thes= e =0A=0A> photos so I have a field called tags. This tag field may contain = 1 or many =0A>tags.=0A> =0A> For example:-=0A> =0A> [ "holiday","camping"]= =0A> or=0A> ["holiday","skiing"]=0A> =0A> I can easily create a view that a= llows me to search the tags with =0A>?key=3D"holiday" =0A>=0A> however I ca= nnot work out how to select photos which contains both tag1 and =0A> tag2.= =0A=0Athe simplest way to do this is with 2 view queries, and compute the = =0Aintersection.=0A=0Athe other option is to emit the tags list in all poss= ible permutations (you can =0Acut them down a bit if you only emit them sor= ted by alpha order). this will make =0Aa much larger index, especially if d= ocs tend to have more than 3 or so tags.=0A=0A> =0A> Any guidance would be = appreciated.=0A> =0A> Regards=0A> =0A> Robin=0A> =0A> =0A=0A=0A --0-968952496-1280083995=:48480--