Return-Path: Delivered-To: apmail-incubator-couchdb-user-archive@locus.apache.org Received: (qmail 66653 invoked from network); 13 May 2008 22:19:50 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 13 May 2008 22:19:50 -0000 Received: (qmail 22643 invoked by uid 500); 13 May 2008 22:19:51 -0000 Delivered-To: apmail-incubator-couchdb-user-archive@incubator.apache.org Received: (qmail 22607 invoked by uid 500); 13 May 2008 22:19:51 -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 22596 invoked by uid 99); 13 May 2008 22:19:51 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 13 May 2008 15:19:51 -0700 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of cmlenz@gmx.de designates 213.165.64.20 as permitted sender) Received: from [213.165.64.20] (HELO mail.gmx.net) (213.165.64.20) by apache.org (qpsmtpd/0.29) with SMTP; Tue, 13 May 2008 22:18:54 +0000 Received: (qmail invoked by alias); 13 May 2008 22:19:16 -0000 Received: from dslb-084-058-002-111.pools.arcor-ip.net (EHLO [192.168.1.199]) [84.58.2.111] by mail.gmx.net (mp018) with SMTP; 14 May 2008 00:19:16 +0200 X-Authenticated: #2618757 X-Provags-ID: V01U2FsdGVkX1+zdS0lE6izSR1QTV42zffFBFQmmmg9wAbNBHTjip OmaAZ1V9ddHpnB Message-Id: From: Christopher Lenz To: couchdb-user@incubator.apache.org In-Reply-To: Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Mime-Version: 1.0 (Apple Message framework v919.2) Subject: Re: mapping on a key that doesn't exist Date: Wed, 14 May 2008 00:19:15 +0200 References: X-Mailer: Apple Mail (2.919.2) X-Y-GMX-Trusted: 0 X-Virus-Checked: Checked by ClamAV on apache.org On 13.05.2008, at 23:19, Bob Briski wrote: > I've found that I can't create a view with a key that includes a > document key that doesn't exist in all documents. > > I confused myself with that opening statement so here's an example > of what I'm talking about: > http://pastie.caboo.se/196397 > > I understand if this is the way it's supposed to work. I also > understand that I can use an if statement to check if the key exists > in the document. However, that means that if I change the schema of > future documents and I've written a previous view that doesn't check > for all of it's keys, those previous views cease to function. > > I thought that a large advantage of document databases is the > ability to change the schema of your documents and not cause > problems. Is this not the case, or am I thinking of this incorrectly? What CouchDB version are you using? I think you're running into a bug in the JS view server that was fixed in trunk sometime after the 0.7.2 release. Cheers, -- Christopher Lenz cmlenz at gmx.de http://www.cmlenz.net/