Return-Path: X-Original-To: apmail-couchdb-user-archive@www.apache.org Delivered-To: apmail-couchdb-user-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id C312C9026 for ; Mon, 24 Sep 2012 19:29:42 +0000 (UTC) Received: (qmail 93826 invoked by uid 500); 24 Sep 2012 19:29:41 -0000 Delivered-To: apmail-couchdb-user-archive@couchdb.apache.org Received: (qmail 93798 invoked by uid 500); 24 Sep 2012 19:29:41 -0000 Mailing-List: contact user-help@couchdb.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@couchdb.apache.org Delivered-To: mailing list user@couchdb.apache.org Received: (qmail 93790 invoked by uid 99); 24 Sep 2012 19:29:41 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 24 Sep 2012 19:29:41 +0000 X-ASF-Spam-Status: No, hits=-0.7 required=5.0 tests=FSL_RCVD_USER,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of john.tigernassau@gmail.com designates 209.85.219.52 as permitted sender) Received: from [209.85.219.52] (HELO mail-oa0-f52.google.com) (209.85.219.52) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 24 Sep 2012 19:29:33 +0000 Received: by oagn1 with SMTP id n1so2391600oag.11 for ; Mon, 24 Sep 2012 12:29:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:date:from:user-agent:mime-version:to:subject:references :in-reply-to:content-type:content-transfer-encoding; bh=ipiZeGsXECOczEyLE0mosdB46B3vMX+PE5sPNvvIcwc=; b=fCtkXQdz45UMOmwEQuEpv8u1KhD2+seeay0aBQbjP7ONnxPk7O3o94onXdivHWpSgO Cw5qslVtaUKZ02Jy+CReJvT+mPUZGDWVIaB3Xn363iTDmKNvVv5l46/doojMULYCEj/s iGSGB/ksNZ2gFQEVQzq5cltlyfHJofOVUaSOHOvKDdDl7zFajQWu0Ngnvz0DQ9mzwlHN x8uJAAJw1+d+U8/umskuGsCJijojWBUFHasfK7aonnqhhjQ9lx6Tp7OzUKo6v2Pwmxnk F2CRZNX/AmM4a20GZMqSw+f3np/2bmrGrxtB+3ju0qNJDY6eQeYba+OFuZ/mqkGY2W6a ZM7A== Received: by 10.60.31.170 with SMTP id b10mr10128502oei.107.1348514952742; Mon, 24 Sep 2012 12:29:12 -0700 (PDT) Received: from [192.168.5.66] (ip-64-134-11-151.public.wayport.net. [64.134.11.151]) by mx.google.com with ESMTPS id g8sm16682107obz.16.2012.09.24.12.29.11 (version=SSLv3 cipher=OTHER); Mon, 24 Sep 2012 12:29:12 -0700 (PDT) Message-ID: <5060B486.6040408@gmail.com> Date: Mon, 24 Sep 2012 13:29:10 -0600 From: "john.tiger" User-Agent: Mozilla/5.0 (X11; Linux i686; rv:10.0.6esrpre) Gecko/20120817 Icedove/10.0.6 MIME-Version: 1.0 To: user@couchdb.apache.org Subject: Re: did query change in 1.20 ? [solved - but..] References: <505FACEC.4060308@gmail.com> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit On 09/24/2012 04:33 AM, Robert Newson wrote: > 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 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. I run debian unstable from the terminal window with couchdb 1.20 from the unstable repository - is it swallowing quotes ? I have no idea. re cloudant experience - maybe that's a different couch build the original json file that was loaded had "username":"jdoe", as I understand, JSON should have double quotes >> >> >> 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= 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); >>>> } >>>> }" >>>> } >>>> >>> >>> >>