incubator-couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Robert Newson <rnew...@apache.org>
Subject Re: did query change in 1.20 ? [solved - but..]
Date Mon, 24 Sep 2012 10:33:19 GMT
Are you sure it's not your shell that's swallowing the double quotes?
?key="foo" should work.

B.

On 24 September 2012 10:45, Simon Metson <simon@cloudant.com> wrote:
> That sounds wrong :) Did your doc.username contain the single quotes?  e.g the double
quotes mean a json string and the single quotes should then be inside that string. How were
you making the query? I can hit http://examples.cloudant.com/animaldb/_design/views101/_view/latin_name?key="Meles
meles" fine, for instance.
>
>
> On Monday, 24 September 2012 at 01:44, john.tiger wrote:
>
>> okay it needed ?key='"jdoe"' single + plus double quotes - I think this
>> needs to be simplified ....
>>
>> On 09/23/2012 06:03 PM, john.tiger 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);
>> > }
>> > }"
>> > }
>> >
>>
>>
>>
>
>

Mime
View raw message