Return-Path: X-Original-To: apmail-couchdb-user-archive@www.apache.org Delivered-To: apmail-couchdb-user-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id A8EA98ADC for ; Tue, 16 Aug 2011 12:32:58 +0000 (UTC) Received: (qmail 77009 invoked by uid 500); 16 Aug 2011 12:32:56 -0000 Delivered-To: apmail-couchdb-user-archive@couchdb.apache.org Received: (qmail 76776 invoked by uid 500); 16 Aug 2011 12:32:51 -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 76767 invoked by uid 99); 16 Aug 2011 12:32:49 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 16 Aug 2011 12:32:49 +0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=FREEMAIL_FROM,HTML_MESSAGE,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 antpky@gmail.com designates 209.85.215.172 as permitted sender) Received: from [209.85.215.172] (HELO mail-ey0-f172.google.com) (209.85.215.172) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 16 Aug 2011 12:32:43 +0000 Received: by eye4 with SMTP id 4so4767643eye.17 for ; Tue, 16 Aug 2011 05:32:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=cC/TKI1TYWkhj23bs18H60eaKwPK02BpKNUQygm3qGQ=; b=touzdKWyMigrg1mLFoL0eOZ25GtJgMU8RUPz9HU5ITQsxsSQvmypzKmGR7NifM3tKN YIxAlWQIkTOSXvPdONdeZusGRLsFr2yUkfQ0ll/qAMTNotSyqH7caeiNUDhruW2EFjIe h2GgqjOU46hoNelsqPvq2yPNy+EOZi+cyIspk= MIME-Version: 1.0 Received: by 10.14.145.67 with SMTP id o43mr815368eej.208.1313497942502; Tue, 16 Aug 2011 05:32:22 -0700 (PDT) Received: by 10.14.45.70 with HTTP; Tue, 16 Aug 2011 05:32:22 -0700 (PDT) Received: by 10.14.45.70 with HTTP; Tue, 16 Aug 2011 05:32:22 -0700 (PDT) In-Reply-To: <6448729C6F9F4DEABF68F63145C98E31@rgabostyle.com> References: <6448729C6F9F4DEABF68F63145C98E31@rgabostyle.com> Date: Tue, 16 Aug 2011 16:32:22 +0400 Message-ID: Subject: Re: Remove field from view From: Antoine Kurukchi To: user@couchdb.apache.org Content-Type: multipart/alternative; boundary=bcaec517ad1e46ae4804aa9e92e3 --bcaec517ad1e46ae4804aa9e92e3 Content-Type: text/plain; charset=ISO-8859-1 I might be thinking of this in the wrong way. I already have the doc and rev id. I'm trying to get the doc without c as c has quite a lot of data. Which isnt required till much later and even then only a few will be needed. The whole database without c is about 25mb. With c its 2 gb. I dont want to seperate c from the other data. Any thoughts? On Aug 16, 2011 1:21 PM, "Gabor Ratky" wrote: > > A view, as its name implies is a read-only view of the underlying data. You can omit emitting `c` in the view, but all that will mean that it will not be included in the view itself (either as its key or its value), but it will still exist in the underlying documents. > > You could potentially emit the whole document MINUS the `c` field as part of the view, but it would result in a huge view, whereas usually you would just use `include_docs=true` parameter to query the document itself along with the view. > > Maybe you could explain what exactly you're trying to achieve in further detail? > > Gabor > > > On Tuesday, August 16, 2011 at 2:13 PM, Antoine Kurukchi wrote: > > > Is it possible in a view to remove a field if present and has anyone got an > > example? I would like to keep all other fields. Also this will be with > > different documents. > > > > For example my document has 3 fields a,b,c. Another document has b,c,d,g. So > > I want the view to process both those documents and remove c. Should have > > the following as the result: > > > > a,b and b,d,g > > > > Antoine > --bcaec517ad1e46ae4804aa9e92e3--