You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@couchdb.apache.org by Brian Candler <B....@pobox.com> on 2009/04/23 15:14:34 UTC
Asking for include_docs=false on a reduce view
Minor API issue: I cannot specify include_docs=false where I also have
reduce=true
That is, it's the fourth case I'm thinking of here:
reduce=false&include_docs=true # OK
reduce=false&include_docs=false # OK
reduce=true&include_docs=true # Nonsensical, rejected OK
reduce=true&include_docs=false # << Rejected, but legitimate?
The reason I raise this is that it's quite useful to be able to set some
defaults for a view, e.g. {:include_docs=>true, :reduce=>false}, and then
be able to override them later.
So I have to complicate things a bit on the client side - I can't just merge
the overriding options, I have to check for :reduce=>true and remove
:include_docs if it is set.
Regards,
Brian.
Re: Asking for include_docs=false on a reduce view
Posted by Chris Anderson <jc...@apache.org>.
On Thursday, April 23, 2009, Brian Candler <B....@pobox.com> wrote:
> Minor API issue: I cannot specify include_docs=false where I also have
> reduce=true
>
This ought to be a tiny patch. I'd say go for it, B.
> That is, it's the fourth case I'm thinking of here:
>
> reduce=false&include_docs=true # OK
> reduce=false&include_docs=false # OK
> reduce=true&include_docs=true # Nonsensical, rejected OK
> reduce=true&include_docs=false # << Rejected, but legitimate?
>
> The reason I raise this is that it's quite useful to be able to set some
> defaults for a view, e.g. {:include_docs=>true, :reduce=>false}, and then
> be able to override them later.
>
> So I have to complicate things a bit on the client side - I can't just merge
> the overriding options, I have to check for :reduce=>true and remove
> :include_docs if it is set.
>
> Regards,
>
> Brian.
>
--
Chris Anderson
http://jchrisa.net
http://couch.io