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 D631DCF01 for ; Thu, 31 May 2012 16:54:49 +0000 (UTC) Received: (qmail 26251 invoked by uid 500); 31 May 2012 16:54:48 -0000 Delivered-To: apmail-couchdb-user-archive@couchdb.apache.org Received: (qmail 26212 invoked by uid 500); 31 May 2012 16:54:48 -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 26200 invoked by uid 99); 31 May 2012 16:54:48 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 31 May 2012 16:54:48 +0000 X-ASF-Spam-Status: No, hits=0.7 required=5.0 tests=SPF_NEUTRAL X-Spam-Check-By: apache.org Received-SPF: neutral (athena.apache.org: local policy) Received: from [198.235.201.17] (HELO barracuda.northwestel.ca) (198.235.201.17) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 31 May 2012 16:54:42 +0000 X-ASG-Debug-ID: 1338482848-04700c6e3e0e720001-z14J5S Received: from [192.168.1.105] ([199.247.191.174]) by barracuda.northwestel.ca with ESMTP id IUhbSgtRz0oM0pkx for ; Thu, 31 May 2012 09:47:28 -0700 (PDT) X-Barracuda-Envelope-From: stephan@bardubitzki.com X-Barracuda-Apparent-Source-IP: 199.247.191.174 Message-ID: <4FC7A0A6.6040704@bardubitzki.com> Date: Thu, 31 May 2012 09:47:34 -0700 From: Stephan Bardubitzki User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:12.0) Gecko/20120430 Thunderbird/12.0.1 MIME-Version: 1.0 To: user@couchdb.apache.org Subject: Re: How to get the doc References: <4FC7975A.2090301@bardubitzki.com> <430BECAAC8F943B08B2FA48591EC820B@cloudant.com> <4FC79A35.7090304@bardubitzki.com> X-ASG-Orig-Subj: Re: How to get the doc In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Barracuda-Connect: UNKNOWN[199.247.191.174] X-Barracuda-Start-Time: 1338482848 X-Barracuda-URL: http://198.235.201.17:8000/cgi-mod/mark.cgi X-Virus-Scanned: by bsmtpd at northwestel.ca X-Barracuda-Spam-Score: 0.00 X-Barracuda-Spam-Status: No, SCORE=0.00 using per-user scores of TAG_LEVEL=1000.0 QUARANTINE_LEVEL=1000.0 KILL_LEVEL=6.8 tests= X-Barracuda-Spam-Report: Code version 3.2, rules version 3.2.2.98550 Rule breakdown below pts rule name description ---- ---------------------- -------------------------------------------------- X-Virus-Checked: Checked by ClamAV on apache.org Thanks Simon, much appreciated. Cheers, Stephan On 12-05-31 09:32 AM, Simon Metson wrote: > I think in general you want to avoid emitting the doc body (for each view that you do this you'll increase your database size by the size of your documents). I vaguely recall someone saying it's faster to have the doc body in the view (because there's one look up instead of two) but I've not noticed it to be a problematic difference, and any non-trivial database is going to be large enough to not want to include the doc body IMHO. > Cheers > Simon > > > On Thursday, 31 May 2012 at 17:20, Stephan Bardubitzki wrote: > >> Thanks, missed that. Would be this the best way to go in any case? Or >> are there scenarios where emitting doc is more appropriate? >> >> On 12-05-31 09:12 AM, Simon Metson wrote: >>> Query the view with ?include_docs=true http://wiki.apache.org/couchdb/HTTP_view_API#Querying_Options >>> >>> >>> On Thursday, 31 May 2012 at 17:07, Stephan Bardubitzki wrote: >>> >>>> Somewhere I read that emitting doc._id and doc is a waste of resources >>>> and that they come for free. >>>> >>>> I know that doc._id comes for free, but how do I get the doc for example >>>> in this case: >>>> >>>> emit(doc.name (http://doc.name), null) >>>> >>>> Thanks. >>>> Stephan >>>> >>> >>> >>> -------------------------------- >>> Spam/Virus scanning by CanIt Pro >>> >>> For more information see >>> http://www.kgbinternet.com/SpamFilter.htm >>> >>> To control your spam filter, log in at >>> http://filter.kgbinternet.com >>> >> >> > > > -------------------------------- > Spam/Virus scanning by CanIt Pro > > For more information see > http://www.kgbinternet.com/SpamFilter.htm > > To control your spam filter, log in at > http://filter.kgbinternet.com >