Return-Path: Delivered-To: apmail-couchdb-user-archive@www.apache.org Received: (qmail 91882 invoked from network); 27 Jan 2011 21:39:26 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 27 Jan 2011 21:39:26 -0000 Received: (qmail 68140 invoked by uid 500); 27 Jan 2011 21:39:24 -0000 Delivered-To: apmail-couchdb-user-archive@couchdb.apache.org Received: (qmail 68044 invoked by uid 500); 27 Jan 2011 21:39:23 -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 68025 invoked by uid 99); 27 Jan 2011 21:39:23 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 27 Jan 2011 21:39:23 +0000 X-ASF-Spam-Status: No, hits=-0.7 required=5.0 tests=FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,SPF_PASS,T_TO_NO_BRKTS_FREEMAIL X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of robert.newson@gmail.com designates 209.85.213.180 as permitted sender) Received: from [209.85.213.180] (HELO mail-yx0-f180.google.com) (209.85.213.180) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 27 Jan 2011 21:39:18 +0000 Received: by yxd30 with SMTP id 30so832864yxd.11 for ; Thu, 27 Jan 2011 13:38:56 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:in-reply-to:references:date :message-id:subject:from:to:content-type:content-transfer-encoding; bh=WFxyDJN8GxXY/07UsUv/F6H/auvMrYBkm0NZjzcK6pg=; b=vUZt5gVZoJKFbuTJc7KwLDpyolziTykBUjHSxp9eGTprQ+M7+Jq2zIM8hWVVIDNhLx oIF7inmV9ImGr22qdlLjQRLwCtvLnbSBMCf1cW5+9JD7VD/q19mA7YclxxdqTyVH0+7I 1n1u+nJvVMWuNPmgCJrSq79pGMb5oHBurDSpM= 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=QgDaq489vZmr86pd3sxeQtGDNKkr4ARB7IYQuhgoBFPo+MxSqr+Px9BrZy8xVTG4/O njDI99mrukUyO6KcoUi+EwlzZszVe4bbKNjs42Gaes+mYYj/9il+HAAU+YSZD2IXC6Si EEvxGYNvkHvZCSvbTdilUABT85vONbNKNpEkk= MIME-Version: 1.0 Received: by 10.204.119.75 with SMTP id y11mr1751172bkq.18.1296151922980; Thu, 27 Jan 2011 10:12:02 -0800 (PST) Received: by 10.204.115.134 with HTTP; Thu, 27 Jan 2011 10:12:02 -0800 (PST) In-Reply-To: References: Date: Thu, 27 Jan 2011 18:12:02 +0000 Message-ID: Subject: Re: erlang views From: Robert Newson To: user@couchdb.apache.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Construct views that give you contiguous ranges for the queries you have. Be wary of doing a query over a much larger range and filtering out the rows you don't want, that might not scale when you have lots of docs. B. On Thu, Jan 27, 2011 at 6:09 PM, Kenneth Tyler wrote: > thanks, > ok, looks like i'll have to use something like couchbeam and process the > view results in erlang > > > ken tyler > > On Thu, Jan 27, 2011 at 9:27 AM, Robert Newson w= rote: > >> No, you can't do that. It's not a language limitation. A b+tree >> supports efficient key look up. It's also efficient to find the >> previous and next key when you do so. So couchdb provides contiguous >> range queries too. Your query can only be completed by a different, >> and more complicated, data structure than couchdb actually supplies. >> >> B. >> >> On Thu, Jan 27, 2011 at 5:21 PM, Kenneth Tyler wrote: >> > If i want to select documents by values in certain parts of a key and >> ignore >> > other parts I don't think I can do that in couch using javascript view= s. >> > >> > If i have keys: a,3,b,4 -- a,2,c,1 -- a,5,b,2 >> > and i want to return keys that match a, _ , b, _ =A0(where _ means "i = don't >> > care") >> > can i do that if i switch to writing the views in erlang ? >> > >> > i know i could deal with this by writing a new view, whose key was mad= e >> up >> > of the 1 and 3rd place values, >> > but what i want is a way to return rows from a view that contains the >> full >> > key by pattern matching >> > thanks >> > ken tyler >> > >> >