From couchdb-user-return-592-apmail-incubator-couchdb-user-archive=incubator.apache.org@incubator.apache.org Sat Jun 28 21:00:23 2008 Return-Path: Delivered-To: apmail-incubator-couchdb-user-archive@locus.apache.org Received: (qmail 82106 invoked from network); 28 Jun 2008 21:00:23 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 28 Jun 2008 21:00:23 -0000 Received: (qmail 82901 invoked by uid 500); 28 Jun 2008 21:00:24 -0000 Delivered-To: apmail-incubator-couchdb-user-archive@incubator.apache.org Received: (qmail 82864 invoked by uid 500); 28 Jun 2008 21:00:24 -0000 Mailing-List: contact couchdb-user-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: couchdb-user@incubator.apache.org Delivered-To: mailing list couchdb-user@incubator.apache.org Received: (qmail 82853 invoked by uid 99); 28 Jun 2008 21:00:24 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 28 Jun 2008 14:00:24 -0700 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of dking@ketralnis.com designates 68.183.67.83 as permitted sender) Received: from [68.183.67.83] (HELO ketralnis.com) (68.183.67.83) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 28 Jun 2008 20:59:34 +0000 Received: from [10.0.0.234] ([10.0.0.234]) (authenticated bits=0) by ketralnis.com (8.14.2/8.14.2) with ESMTP id m5SKxrhE001898 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=NO) for ; Sat, 28 Jun 2008 13:59:53 -0700 (PDT) (envelope-from dking@ketralnis.com) Message-Id: <732371C2-90AC-483D-89CA-1E919B7BF2F0@ketralnis.com> From: David King To: couchdb-user@incubator.apache.org In-Reply-To: <250C86A3-3F40-4C48-B05B-2ED9DCFF1109@apache.org> Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Mime-Version: 1.0 (Apple Message framework v924) Subject: Re: General-understanding questions about views Date: Sat, 28 Jun 2008 13:59:50 -0700 References: <3F12B537-F1E1-45A5-857E-53E8CD5EC73E@ketralnis.com> <250C86A3-3F40-4C48-B05B-2ED9DCFF1109@apache.org> X-Mailer: Apple Mail (2.924) X-Virus-Checked: Checked by ClamAV on apache.org > Here we have to tackle the first issue: Do not try to map what you > know > from SQL to CouchDB. Maybe I just worded it poorly. How about "I'm trying to understand how couchdb would solve some problems that I'm currently solving with SQL and come up with some intermediately mappaable vocabulary so that I can gloss over the bits that I don't understand until I do so that I can tackle one concept at a time". But that's much longer :) > Your map functions must return the same result for the same input > [...] > So what you would do here instead, is: > function(doc) { > emit(doc.date, null); > } > and query with /db/_view/date/name? > startkey=timestamp_from_interval('1 week')&endkey=now() Ah, very cool. I was mis-understanding the Key, which answers almost all of my questions as once > Same thing. I note that you explicitly mention permanent views. Do not > use temporary views in production, only during development. That answers my next question too. > Feel free to send in more questions as they come :-) Oh I will :) I'm an Erlang developer. Any tips on where to start reading if I plan to begin understand the code-base?