Return-Path: Delivered-To: apmail-couchdb-user-archive@www.apache.org Received: (qmail 19736 invoked from network); 28 Sep 2010 06:40:25 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 28 Sep 2010 06:40:25 -0000 Received: (qmail 84598 invoked by uid 500); 28 Sep 2010 06:40:23 -0000 Delivered-To: apmail-couchdb-user-archive@couchdb.apache.org Received: (qmail 84377 invoked by uid 500); 28 Sep 2010 06:40:21 -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 84368 invoked by uid 99); 28 Sep 2010 06:40:20 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 28 Sep 2010 06:40:20 +0000 X-ASF-Spam-Status: No, hits=2.2 required=10.0 tests=FREEMAIL_FROM,HTML_MESSAGE,RCVD_IN_DNSWL_NONE,SPF_PASS,T_TO_NO_BRKTS_FREEMAIL X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of tehdanish@gmail.com designates 74.125.82.180 as permitted sender) Received: from [74.125.82.180] (HELO mail-wy0-f180.google.com) (74.125.82.180) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 28 Sep 2010 06:40:12 +0000 Received: by wyj26 with SMTP id 26so6936729wyj.11 for ; Mon, 27 Sep 2010 23:39:52 -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=F0t/jcu13S6I8vlZPMLSYbN1H24eTk2M75HgPsLeF7A=; b=dmqJskT5PAUhd3X4kb237V7UPx5BIKgu5T/QsIEo27rU0XujMTp55G0wBmPpG9jqcG CgI7P1Drxegq00ACidgooXTrjkv2Ce0WcoAknrulSa4OkHz3vYtx3AYNhNLK8UtD0u6F kkNvKdZMtRNomsRwoUWHdJ5UCgnDvn5ZqzGPE= 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=j2kg3e+GSSdGpnORAYlnA0YILYphuHPVgSZGQk9H9hOnwShMTnD+vE4Cpl80rBCrXI YHuaP8HNduMRGTVHFvk+JBm1tkHVT2gEER3IN4uScA5XEdUs+OvnZ8UDhAwVlDm97r8o cMxFVMMAxAGnE9kXEHc6iopg6PAd12ZiHEu48= MIME-Version: 1.0 Received: by 10.216.1.20 with SMTP id 20mr622449wec.66.1285655991921; Mon, 27 Sep 2010 23:39:51 -0700 (PDT) Received: by 10.216.71.200 with HTTP; Mon, 27 Sep 2010 23:39:51 -0700 (PDT) In-Reply-To: References: Date: Tue, 28 Sep 2010 16:39:51 +1000 Message-ID: Subject: Re: Views with composite keys inclusive_end not functioning correctly From: Danny Brain To: user@couchdb.apache.org Content-Type: multipart/alternative; boundary=0016364c7367b3ac9204914c1c47 X-Virus-Checked: Checked by ClamAV on apache.org --0016364c7367b3ac9204914c1c47 Content-Type: text/plain; charset=UTF-8 That's the one. For some reason the startkey was handled fine (without being escaped correctly), but the endkey was grumpy. On Tue, Sep 28, 2010 at 4:34 PM, Eli Stevens (Gmail) wrote: > 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 < > paul.joseph.davis@gmail.com>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 > --0016364c7367b3ac9204914c1c47--