Reduce with 'keys' returns empty result


#1

I’ve created a view and here is query result:
http://127.0.0.1:8092/devbucket/_design/dev_GMap/_view/allView_test

{"total_rows":42,"rows":[
{"id":"7ce470c7-d30c-4df0-b306-5920f328e4e6","key":[1,1],"value":{"type":"poiv3","latitude":30.285604,"longitude":57.092047,"username":"khod","teamID":"1","projectID":"1"}},
{"id":"05bf2ee3-a3e2-4061-8e4b-8358359c731c","key":[45,1],"value":{"type":"polev13","latitude":30.284181,"longitude":57.083093,"username":"ave","teamID":"45","projectID":"1"}},
{"id":"0f07afe3-303d-47c6-bfa5-b884e61cd798","key":[45,1],"value":{"type":"polev13","latitude":30.284024,"longitude":57.080915,"username":"ave","teamID":"45","projectID":"1"}},
{"id":"1411518b-a6e3-4881-8238-d99d3319166f","key":[45,1],"value":{"type":"polev13","latitude":30.287554,"longitude":57.080374,"username":"ave","teamID":"45","projectID":"1"}},
{"id":"1ba352cf-16b0-4066-b8a1-b988ffd4c215","key":[45,1],"value":{"type":"poiv3","latitude":30.286099,"longitude":57.076876,"username":"ave","teamID":"45","projectID":"1"}},
{"id":"202f8b55-5e30-4934-91d4-31dbbb9b105e","key":[45,1],"value":{"type":"polev13","latitude":30.289573999999998,"longitude":57.084526,"username":"ave","teamID":"45","projectID":"1"}},
{"id":"409e2f58-fb3a-4675-ad2b-a86064fb7fee","key":[45,1],"value":{"type":"polev13","latitude":30.285349,"longitude":57.080673,"username":"ave","teamID":"45","projectID":"1"}},
{"id":"42b7cc23-231c-4ecf-9c68-12e2640f4bcc","key":[45,1],"value":{"type":"poiv3","latitude":30.283897999999997,"longitude":57.082798,"username":"ave","teamID":"45","projectID":"1"}},
{"id":"4bb77e4a-91e9-468d-ad58-9da56f0cf4bc","key":[45,1],"value":{"type":"polev13","latitude":30.288916,"longitude":57.083296,"username":"ave","teamID":"45","projectID":"1"}},
{"id":"4e0de2a5-f16c-4d47-bf57-b90afae482fc","key":[45,1],"value":{"type":"polev13","latitude":30.284001,"longitude":57.084258,"username":"ave","teamID":"45","projectID":"1"}}
]}

when I want to filter the view with ‘keys’ the result is empty
keys = [45,1]

http://127.0.0.1:8092/devbucket/_design/dev_GMap/_view/allView_test?keys=[45%2C1]

{"total_rows":42,"rows":[
]
}

I even used keys with string format
keys=[“45”,“1”]
and got the same result.
The same result with PHP SDK 2.0

$query=CouchbaseViewQuery::from('dev_GMap','allView_test')->keys(array(45,1));

#2

Hi,

try with Key=[45,1] or keys=[[45,1]]


#3

Oh, great! Thanks.
So what’s the ‘keys’ parameter for if I can achieve multi-key filtering with ‘key’?