Hello,
I have given map reduce view
Map function
function (doc, meta) { emit([doc.surname, doc.name], null); }
Reduce:
_count
Now I want to query the view. I could execute queries with grou_level=2 and specified key (response contains JSON with expected results) e.g.:
http://localhost:8091/couchBase/<BUCKET_NAME>/_design/<DESIGN_NAME>/_view/<VIEW_NAME>?connection_timeout=60000&group_level=2&key=[“XYZ”,“ABC”]
but could not ask for e.g. number of documents where surname == “XYZ” (response is empty)
http://localhost:8091/couchBase/<BUCKET_NAME>/_design/<DESIGN_NAME>/_view/<VIEW_NAME>?connection_timeout=60000&group_level=1&key=[“XYZ”]
I am using Couchbase CE 4.5.1. Could anyone explain me how this operation is not possible or what I am doing wrong?
Thank you for any advice!
Regards