In a multi-query view request, set view type for each query
Namely, a default `reduce` view type can be overridden to behave like a `map`,
if user explicitly sets `reduce=false`.
Previously this didn't happen. 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, because user explicitly disabled `reduce` and now
`include_docs` is valid for a map view.
To fix, make sure to call `set_view_type` for each query's args.
Jira: COUCHDB-3070
1 file changed