Return-Path: X-Original-To: apmail-couchdb-user-archive@www.apache.org Delivered-To: apmail-couchdb-user-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 04E87409A for ; Fri, 10 Jun 2011 19:39:43 +0000 (UTC) Received: (qmail 91094 invoked by uid 500); 10 Jun 2011 19:39:41 -0000 Delivered-To: apmail-couchdb-user-archive@couchdb.apache.org Received: (qmail 91065 invoked by uid 500); 10 Jun 2011 19:39:41 -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 91056 invoked by uid 99); 10 Jun 2011 19:39:41 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 10 Jun 2011 19:39:41 +0000 X-ASF-Spam-Status: No, hits=-2.3 required=5.0 tests=RCVD_IN_DNSWL_MED X-Spam-Check-By: apache.org Received-SPF: unknown (athena.apache.org: error in processing during lookup of N.Breunese@vpro.nl) Received: from [145.58.30.184] (HELO out1a.mail.omroep.nl) (145.58.30.184) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 10 Jun 2011 19:39:34 +0000 Received: from localhost (ou1aclean [10.10.30.156]) by out1a.mail.omroep.nl (Postfix MTA - NPO ICT) with ESMTP id BDAAD8011CC for ; Fri, 10 Jun 2011 21:39:12 +0200 (CEST) X-Virus-Scanned: NPO ICT Received: from zeefje.vpro.nl (zeefje.vpro.nl [145.58.168.41]) by out1a.mail.omroep.nl (Postfix MTA - NPO ICT) with ESMTP id A274B8011A2 for ; Fri, 10 Jun 2011 21:39:12 +0200 (CEST) X-ASG-Debug-ID: 1307734751-00848408f21dd950001-z14J5S Received: from mail.vpro.nl (mail.vpro.nl [145.58.171.81]) by zeefje.vpro.nl with ESMTP id KAc2emxaNOkN7TlH for ; Fri, 10 Jun 2011 21:39:11 +0200 (CEST) X-Barracuda-Envelope-From: N.Breunese@vpro.nl X-Barracuda-Apparent-Source-IP: 145.58.171.81 Received: from VS-EX-01.intra.vpro.nl ([145.58.171.81]) by VS-EX-01.intra.vpro.nl ([145.58.171.81]) with mapi; Fri, 10 Jun 2011 21:39:11 +0200 From: Nils Breunese To: "user@couchdb.apache.org" Date: Fri, 10 Jun 2011 21:37:16 +0200 Subject: RE: One view per "query"? Thread-Topic: One view per "query"? X-ASG-Orig-Subj: RE: One view per "query"? Thread-Index: AcwngvM/OYERR06SRbafw3PTaNJDxAAItqSg Message-ID: References: <64497E8E-7AEA-4E30-A44E-5AD285887150@challet.eu> <20110610100436.a3f9ab54.mk@cognitivedissonance.ca> , In-Reply-To: Accept-Language: nl-NL Content-Language: nl-NL X-MS-Has-Attach: X-MS-TNEF-Correlator: acceptlanguage: nl-NL Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Barracuda-Connect: mail.vpro.nl[145.58.171.81] X-Barracuda-Start-Time: 1307734751 X-Barracuda-URL: http://145.58.168.41:80/cgi-mod/mark.cgi X-Virus-Scanned: by bsmtpd at vpro.nl X-Barracuda-Bayes: INNOCENT GLOBAL 0.5036 1.0000 0.7500 X-Barracuda-Spam-Score: 0.75 X-Barracuda-Spam-Status: No, SCORE=0.75 using global scores of TAG_LEVEL=1000.0 QUARANTINE_LEVEL=1000.0 KILL_LEVEL=9.0 tests= X-Barracuda-Spam-Report: Code version 3.2, rules version 3.2.2.65968 Rule breakdown below pts rule name description ---- ---------------------- -------------------------------------------------- The query arguments are startkey and endkey, not startKey and endKey. You might want to just use key=3D in this case though. http://wiki.apache.org/couchdb/HTTP_view_API#Querying_Options Nils. ________________________________________ Van: Peter Nolan [peterwnolan@gmail.com] Verzonden: vrijdag 10 juni 2011 17:27 Aan: user@couchdb.apache.org Onderwerp: Re: One view per "query"? you can create a view called byArtist whose code looks like the following. function (doc) { if (doc.artist) { emit(doc.artist,otherStuffYouWantToKnow) } } then you can query this view with startKey=3D'dylan' and endKey=3D'dylan' and receive those docs that only have the field of artist set to 'dylan'. ------------------------------------------------------------------------ VPRO www.vpro.nl ------------------------------------------------------------------------