You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@couchdb.apache.org by "ASF subversion and git services (JIRA)" <ji...@apache.org> on 2016/07/21 21:57:20 UTC
[jira] [Commented] (COUCHDB-3070) Incorrect view argument
valudation for multi-query (POST) view
[ https://issues.apache.org/jira/browse/COUCHDB-3070?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15388500#comment-15388500 ]
ASF subversion and git services commented on COUCHDB-3070:
----------------------------------------------------------
Commit 12af1697bcc40e40eec1aef1b96c0afb85cce2bd in couchdb-chttpd's branch refs/heads/couchdb-3070-fix-multi-query-view-type from [~kzx]
[ https://git-wip-us.apache.org/repos/asf?p=couchdb-chttpd.git;h=12af169 ]
In a view multi-query request, set view type for each query
View type can be overridden if user explicitly sets reduce=false, for example.
This can happen for individual query.
Previously this didn't happen and view_type was set once at the top, just
based on the view itself. For for example, a query like this:
```
{
"queries": [{
"include_docs": true,
"reduce": false
}]
}
```
would fail with:
```
{"error":"query_parse_error","reason":"`include_docs` is invalid for reduce"}
```
But it shouldn't fail because user explicitly disabled `reduce` for that one.
To fix, make sure to call `set_view_type` for each query's args.
Jira: COUCHDB-3070
> Incorrect view argument valudation for multi-query (POST) view
> --------------------------------------------------------------
>
> Key: COUCHDB-3070
> URL: https://issues.apache.org/jira/browse/COUCHDB-3070
> Project: CouchDB
> Issue Type: Bug
> Components: Database Core
> Reporter: Nick Vatamaniuc
>
> This query
> {code}
> {
> "queries": [{
> "include_docs": true,
> "reduce": false
> }]
> }
> {code}
> fails for instance with:
> {code}
> curl -XPOST 'http://adm:pass@localhost:15984/d/_design/d1/_view/v1' -H "Content-Type: application/json" -d @q2.json
> {"error":"query_parse_error","reason":"`include_docs` is invalid for reduce"}
> {code}
> But it shouldn't since user explicitly passed reduce as false.
> This should be a 2.0 issue as it prevents queries from working correctly
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)