You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@couchdb.apache.org by "john.tiger" <jo...@gmail.com> on 2012/09/24 02:03:28 UTC
did query change in 1.20 ?
was there a change from ?key=<some value> what is the right syntax ?
/_design/ddoc/_view/getuserdoc?key="jdoe"
=> "error":"bad_request","reason":"invalid_json"}
so does "key"="jdoe", so does key=jdoe
but
?{key:"jdoe"} returns all doctypes="user" but not just jdoe as wanted
here's the view:
"views":{
"getuserdoc":{
"map":"function(doc) {
if (doc.doctype == 'user'){
emit(doc.username, doc);
}
}"
}
Re: did query change in 1.20 ?
Posted by Mark Hahn <ma...@hahnca.com>.
Is this being issued on a command line? Is everything escaped properly?
On Sun, Sep 23, 2012 at 5:03 PM, john.tiger <jo...@gmail.com>wrote:
> was there a change from ?key=<some value> what is the right syntax ?
>
> /_design/ddoc/_view/**getuserdoc?key="jdoe"
>
> => "error":"bad_request","reason"**:"invalid_json"}
> so does "key"="jdoe", so does key=jdoe
>
> but
> ?{key:"jdoe"} returns all doctypes="user" but not just jdoe as wanted
>
> here's the view:
>
> "views":{
> "getuserdoc":{
> "map":"function(doc) {
> if (doc.doctype == 'user'){
> emit(doc.username, doc);
> }
> }"
> }
>