You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@couchdb.apache.org by "Weixiang Guan (JIRA)" <ji...@apache.org> on 2014/07/28 13:10:39 UTC

[jira] [Commented] (COUCHDB-2280) Default view options in design document

    [ https://issues.apache.org/jira/browse/COUCHDB-2280?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14076111#comment-14076111 ] 

Weixiang Guan commented on COUCHDB-2280:
----------------------------------------

Hi Robert, according to your link, include_docs indeed is not included in the options field. But according to [the documentation of CouchDB|http://docs.couchdb.com/en/latest/api/ddoc/views.html]: {quote}In additional to these options, you may specify any other with their default value. E.g. having option "include_docs": true will automatically includes document body for view results response. You still may override such by explicitly defining same query parameter name with other value.{quote}. This statement is both in versions 1.5 and 1.6. Is this only a feature available in 1.6 or something?

> Default view options in design document
> ---------------------------------------
>
>                 Key: COUCHDB-2280
>                 URL: https://issues.apache.org/jira/browse/COUCHDB-2280
>             Project: CouchDB
>          Issue Type: Bug
>      Security Level: public(Regular issues) 
>          Components: JavaScript View Server
>            Reporter: Weixiang Guan
>
> I have put {code:javascript}"options":{"include_docs":true}{code} in my design document and in my *map* functions I emitted something like {code:javascript}{"_id":doc._id}{code}. However when I query the view without explicitly specifying {quote}include_docs=true{quote} I do not get the linked documents (the other way around, when I specify include_docs=true, I get the desired results with linked documents). So I think the problem is the "options" field in the design document is not working. In the documentation I saw actually, one can put query parameters in "options" field to make those default, and I did not see any other requirement to make this work. Please check this.
> BTW, I am using CouchDB 1.5 (1.6 is not working on my computer, don't know why).



--
This message was sent by Atlassian JIRA
(v6.2#6252)