Details
-
Bug
-
Resolution: Fixed
-
Major
-
2.0-beta
-
Security Level: Public
-
None
-
Windows 7 64 bit
Description
- If a map function is in a case where it doesn't emit anything (conditional emit)
- If a reduce function is present (but not any built-in _count, _sum or _stats)
Calling the view with reduce=false returns: {"error":"unknown_error","reason":"badarg"}expected:
{"total_rows":0,"rows":[]}
Steps to reproduce:
Create a view with map function:
function (doc, meta) {
}
and reduce function:
function (key, values, rereduce)
Visit: http://localhost:8092/default/_design/dev_test/_view/empty?reduce=false&stale=false
(local install, design doc name is 'test', view name is 'empty')
Observe result:
{"error":"unknown_error","reason":"badarg"}