couchdb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Nolan Lawson (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (COUCHDB-2227) Feature request: _all_docs?exclude_ddocs=true
Date Mon, 21 Apr 2014 17:56:15 GMT

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

Nolan Lawson commented on COUCHDB-2227:
---------------------------------------

Thanks, {{include_ddocs}} would be awesome. Even without doc IDs containing capital letters,
the sugar is really nice.

> Feature request: _all_docs?exclude_ddocs=true
> ---------------------------------------------
>
>                 Key: COUCHDB-2227
>                 URL: https://issues.apache.org/jira/browse/COUCHDB-2227
>             Project: CouchDB
>          Issue Type: Wish
>      Security Level: public(Regular issues) 
>          Components: HTTP Interface
>            Reporter: Nolan Lawson
>            Priority: Minor
>
> Design docs are included in {{\_all_docs}} results, which is by design (hyuk hyuk). 
However, this can be surprising and unwanted behavior for new users, and plus, sometimes it's
tricky to exclude them, e.g. if your docids come both before and after the {{_}} character:
> {code:javascript}
> {"total_rows":6,"offset":0,"rows":[
> {"id":"Bar","key":"Bar","value":{"rev":"1-967a00dff5e02add41819138abb3284d"}},
> {"id":"Foo","key":"Foo","value":{"rev":"1-967a00dff5e02add41819138abb3284d"}},
> {"id":"_design/temp","key":"_design/temp","value":{"rev":"1-ee20bd300ce7ffa18e9ef1144fa50fd4"}},
> {"id":"_design/temp2","key":"_design/temp2","value":{"rev":"1-9b626494fef9a884a383345540c29e97"}},
> {"id":"bar","key":"bar","value":{"rev":"1-967a00dff5e02add41819138abb3284d"}},
> {"id":"foo","key":"foo","value":{"rev":"1-967a00dff5e02add41819138abb3284d"}}
> ]}
> {code}
> What I would like is a query param like {{exclude_ddocs}}, which defaults to false and
would only return non-design documents, but otherwise function exactly the same.  What {{offset}}
and {{total_rows}} would do in this case is up to you.
> Workaround: The best workaround is to do two separate queries, one with the parameters
{{endkey=%22_design/%22}} and the other with {{startkey=%22_design0%22}}. But this is not
particularly elegant.



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

Mime
View raw message