Return-Path: Delivered-To: apmail-incubator-couchdb-user-archive@locus.apache.org Received: (qmail 14372 invoked from network); 13 Jun 2008 19:17:18 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 13 Jun 2008 19:17:18 -0000 Received: (qmail 87721 invoked by uid 500); 13 Jun 2008 19:17:20 -0000 Delivered-To: apmail-incubator-couchdb-user-archive@incubator.apache.org Received: (qmail 87702 invoked by uid 500); 13 Jun 2008 19:17:20 -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 87691 invoked by uid 99); 13 Jun 2008 19:17:20 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 13 Jun 2008 12:17:20 -0700 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of jan@prima.de designates 83.97.50.139 as permitted sender) Received: from [83.97.50.139] (HELO jan.prima.de) (83.97.50.139) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 13 Jun 2008 19:16:30 +0000 Received: from [192.168.1.34] (dslb-088-073-114-224.pools.arcor-ip.net [::ffff:88.73.114.224]) (AUTH: LOGIN jan, TLS: TLSv1/SSLv3,128bits,AES128-SHA) by jan.prima.de with esmtp; Fri, 13 Jun 2008 18:27:45 +0000 Message-Id: <6935CC14-5DDF-467F-BEFB-BFDC4683AB6A@prima.de> From: Jan Lehnardt To: "couchdb-user@incubator.apache.org" In-Reply-To: <4852B50D.2060509@gmail.com> Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes X-Mailer: iPhone Mail (4A102) Mime-Version: 1.0 (iPhone Mail 4A102) Subject: Re: Modifying fields Content-Transfer-Encoding: 7bit Date: Fri, 13 Jun 2008 20:24:37 +0200 References: <48516A9B.5060401@gmail.com> <48519E04.8040304@gmail.com> <567B2EFA-3E14-4A4B-9C0A-F27225B8715C@apache.org> <4851B3D9.1040403@gmail.com> <7770A5DA-9B70-4C37-9075-1D3EB1E33FDF@apache.org> <4852B50D.2060509@gmail.com> X-Virus-Checked: Checked by ClamAV on apache.org If we were to implement this, CouchDB would still do a full document update to comply with the revision system. Cheers Jan -- On 13 Jun 2008, at 19:57, Brad Schick wrote: > > On 06/13/2008 01:53 AM, Jan Lehnardt wrote: >>>>> Follow up questions on this: Does CouchDB internally track and >>>>> reference >>>>> individual fields? Or is the json for each document basically a >>>>> blob to >>>>> everything except View code? >>>> >>>> Documents are stored into native Erlang types representing each >>>> document. Except for the view server, no-one cares about what >>>> a document look like. >>> So the DB just treats each document like a string I assume? I was >>> hoping >>> it actually understood the fields. If it doesn't know about >>> fields, then >>> I understand that it might not be that much more efficient doing >>> things >>> on the server. >>> >>> But I'm curious; if the Erlang code doesn't look inside documents >>> why do >>> I get errors if I pass just a json array as the body of a >>> document? It >>> seems to require a json object with named pairs. >> >> No no, CouchDB definitely looks at the JSON structure. >> > > Thanks for the continued feedback. So is CouchDB internally able to > modify individual fields within a document? Or even if it can not do > so > yet, would it be practical to add later? > > It makes sense for this to not be a priority now, I'm just wondering > if > this somehow fundamental contradicts CouchDB's design. > > -Brad >