incubator-couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Simon Metson <si...@cloudant.com>
Subject Re: How to get the doc
Date Thu, 31 May 2012 16:32:37 GMT
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
> > 
> 
> 
> 



Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message