Return-Path: Delivered-To: apmail-couchdb-user-archive@www.apache.org Received: (qmail 18364 invoked from network); 28 Sep 2010 06:35:14 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 28 Sep 2010 06:35:14 -0000 Received: (qmail 80671 invoked by uid 500); 28 Sep 2010 06:35:13 -0000 Delivered-To: apmail-couchdb-user-archive@couchdb.apache.org Received: (qmail 80339 invoked by uid 500); 28 Sep 2010 06:35:10 -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 80327 invoked by uid 99); 28 Sep 2010 06:35:09 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 28 Sep 2010 06:35:09 +0000 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests=FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,SPF_PASS,T_TO_NO_BRKTS_FREEMAIL X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of wickedgrey@gmail.com designates 209.85.161.180 as permitted sender) Received: from [209.85.161.180] (HELO mail-gx0-f180.google.com) (209.85.161.180) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 28 Sep 2010 06:35:02 +0000 Received: by gxk4 with SMTP id 4so2564125gxk.11 for ; Mon, 27 Sep 2010 23:34:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:in-reply-to :references:date:message-id:subject:from:to:content-type; bh=H+307bBbxkvusTF3XXO9Rm+MzhHPrIuST0nVkoOhhXk=; b=Sfz8nRiAwFEiYh2QOSyB/BcV94HgGpc2VQOi2rJeOX4eZ/2JOVkp8V9ZZ/6VuOdw1h 7TviCAOhH8D6LoDDhABmcjfmExaT3GG7LbzFs475RZcI5wiL78F9CL9KV3HER4oMud5b LSglDl9XLOB2ckli5lzTmKhrV8T1XwhsfTsr8= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; b=kLGp3hD/X55+liTgt2iqu1vygrJoMukQFIgR5fTLkhGB0ZS502VT7PiL3mchoF4Qim EmSp+2bzhPMByAVODD10qs+slTsa1B/mYG1qckgPWzEEjwRm5byBHFWdhLt9bPJ5Gw+/ tckcUEFj+yFiTbTUu9vrJpM1z/teVtiTHprF8= MIME-Version: 1.0 Received: by 10.150.135.10 with SMTP id i10mr10176434ybd.181.1285655681609; Mon, 27 Sep 2010 23:34:41 -0700 (PDT) Received: by 10.150.227.2 with HTTP; Mon, 27 Sep 2010 23:34:41 -0700 (PDT) In-Reply-To: References: Date: Mon, 27 Sep 2010 23:34:41 -0700 Message-ID: Subject: Re: Views with composite keys inclusive_end not functioning correctly From: "Eli Stevens (Gmail)" To: user@couchdb.apache.org Content-Type: text/plain; charset=ISO-8859-1 So it was a (lack of) escaping issue, then? :) Eli On Mon, Sep 27, 2010 at 9:54 PM, Danny Brain wrote: > Thanks Paul. I've located the real source of my problem, the actual keys > (not example data) contained + symbols. > These were being lost when hitting the view. > > On Tue, Sep 28, 2010 at 11:28 AM, Paul Davis wrote: > >> On Mon, Sep 27, 2010 at 8:50 PM, Danny Brain wrote: >> > Hello, >> > >> > I'm having an issue where views with composite keys are not inclusive of >> the >> > endkey, even with inclusive_end specified as true. >> > This is preventing me from correctly selecting a group of documents as >> per >> > the "Linked documents" section on the Http view API wiki page ( >> > http://wiki.apache.org/couchdb/Introduction_to_CouchDB_views) >> > >> > I'm running CouchDb 1.0.1. Example of the issue I'm seeing: >> > >> > composite_key_view?startkey=["AA"]&inclusive_end=true >> > {"id":"1","key":["AA",0],"value":null}, >> > {"id":"1","key":["AA",1],"value":{"_id":"4"}}, >> > {"id":"2","key":["BB",0],"value":null} >> > >> > composite_key_view?startkey=["AA"]&endkey=["AA"]&inclusive_end=true >> > No results >> >> ["AA"] == ["AA"] < ["AA", 0] >> >> > >> > composite_key_view?startkey=["AA"]&endkey=["BB"]&inclusive_end=true >> > {"id":"1","key":["AA",0],"value":null}, >> > {"id":"1","key":["AA",1],"value":{"_id":"4"}} >> > >> >> ["AA"] < ["AA", 0] < ["AA", 1] < ["BB"] < ["BB", 0] >> >> > The last example works, but requires me to know what comes after AA in >> the >> > results, and you'd think inclusive_end would make BB show up as well. >> > Has anyone had this problem? Any ideas on how to solve it? >> > >> > Thanks! >> > >> >> In neither example does inclusive_end come into effect. >> >> To get everything with "AA" as the first element of the array key you want: >> >> ?startkey=["AA"]&endkey=["AA", {}] >> >> Inclusive end has nothing to do with it. >> >> HTH, >> Paul Davis >> > -- Eli