Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Won't Fix
-
None
-
None
-
None
Description
The behaviour of the keys filter of /_users/_all_docs appears to have changed between v1.6 and v2. For known-existing keys (users), "error":"not_found" is returned. For example:
v1.6:
❯ curl localhost:5984/_users/_all_docs {"total_rows":2,"offset":0,"rows":[ {"id":"_design/_auth","key":"_design/_auth","value":{"rev":"1-75efcce1f083316d622d389f3f9813f7"}}, {"id":"org.couchdb.user:dbreader","key":"org.couchdb.user:dbreader","value":{"rev":"1-d7ae446ad8ee720d23f0e420e0398f45"}} ]} ❯ curl -X POST -d '{"keys": ["org.couchdb.user:dbreader"]}' -H 'Content-Type: application/json' http://localhost:5984/_users/_all_docs {"total_rows":2,"offset":0,"rows":[ {"id":"org.couchdb.user:dbreader","key":"org.couchdb.user:dbreader","value":{"rev":"1-d7ae446ad8ee720d23f0e420e0398f45"}} ]}
v2.0.0:
❯ curl localhost:5984/_users/_all_docs {"total_rows":2,"offset":0,"rows":[ {"id":"_design/_auth","key":"_design/_auth","value":{"rev":"1-75efcce1f083316d622d389f3f9813f7"}}, {"id":"org.couchdb.user:dbreader","key":"org.couchdb.user:dbreader","value":{"rev":"1-75efcce1f083316d622d389f3f9813f7"}} ]} ❯ curl -X POST -d '{"keys": ["org.couchdb.user:dbreader"]}' -H 'Content-Type: application/json' http://localhost:5984/_users/_all_docs {"total_rows":2,"offset":0,"rows":[ {"key":"org.couchdb.user:dbreader","value":{"error":"not_found"} ]}
Is this expected behaviour in v2?