Return-Path: Delivered-To: apmail-couchdb-user-archive@www.apache.org Received: (qmail 9410 invoked from network); 15 Apr 2009 17:24:55 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 15 Apr 2009 17:24:55 -0000 Received: (qmail 56693 invoked by uid 500); 15 Apr 2009 17:24:54 -0000 Delivered-To: apmail-couchdb-user-archive@couchdb.apache.org Received: (qmail 56626 invoked by uid 500); 15 Apr 2009 17:24:54 -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 56616 invoked by uid 99); 15 Apr 2009 17:24:54 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 15 Apr 2009 17:24:54 +0000 X-ASF-Spam-Status: No, hits=1.5 required=10.0 tests=NORMAL_HTTP_TO_IP,SPF_PASS,WEIRD_PORT X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of paul.joseph.davis@gmail.com designates 74.125.92.27 as permitted sender) Received: from [74.125.92.27] (HELO qw-out-2122.google.com) (74.125.92.27) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 15 Apr 2009 17:24:46 +0000 Received: by qw-out-2122.google.com with SMTP id 8so2555qwh.29 for ; Wed, 15 Apr 2009 10:24:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:content-type :content-transfer-encoding; bh=Mc8i0wJIpUG8fz7c/uUcMh3oQTvNwlBwNk0cXxGjcNo=; b=n911z/e4wk47DsqUDzZr3vYrNYzmGSn6YDsmcpQdDnNyl6/f0fZ5K2hewhspo18kYM +q0J49yHx26KFHJHKP6i3zIBVd4Tl2hOaSdSMsJT2HfXYh9QmdbQAuXN8ZaiMv1DScdO lf3jDUY0LRaagfsTN2fwqg4NM7Nzeb3wLpk48= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:content-transfer-encoding; b=pPCgUSUoxp6rdtdVWEj4a0c1vVCq9u2WnobuNtuKE9V12I8lZulMwpntmW4H89W2Jm oyvPEHmwixLBz5yH0kmvGmfd+gly4WDh73Vri6BOpOilkxuhppDQxepQaDG35GPPoHaU 8ulJQzVKG3UVNm6P7u3QSuP33hFwwJdl3V9q8= MIME-Version: 1.0 Received: by 10.231.37.68 with SMTP id w4mr489230ibd.54.1239816264971; Wed, 15 Apr 2009 10:24:24 -0700 (PDT) In-Reply-To: <19d72f970904151015w24233220o87abce84fddc23a9@mail.gmail.com> References: <19d72f970904151015w24233220o87abce84fddc23a9@mail.gmail.com> Date: Wed, 15 Apr 2009 13:24:24 -0400 Message-ID: Subject: Re: New to couchdb, question about dynamic view? From: Paul Davis To: user@couchdb.apache.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Virus-Checked: Checked by ClamAV on apache.org Jason, You'll want something like: { "_id": "_design/foo", "views": { "bar": "function(doc) {if(doc.attribute) emit(doc.attribute, null);= }" } } After saving that you can use a URL like: http://127.0.0.1:5984/db_name/_design/foo/_view/bar?key=3Duser_input And you'll get the list of docs that have that attribute. HTH, Paul Davis On Wed, Apr 15, 2009 at 1:15 PM, Jason Tahaney wrote: > Hello, > > Very new to couchdb. =A0Can someone please tell me how I would represent = a > search for an attribute value (say from user input) in a design view? =A0= Are > design views static (everything I read points to yes)? =A0I'm probably tr= ying > to use the wrong feature. =A0Just looking for a way to say search where > attribute=3Dvalue and value comes from user input. > > Thanks, > > Jason >