From user-return-12960-apmail-couchdb-user-archive=couchdb.apache.org@couchdb.apache.org Tue Sep 28 00:56:13 2010 Return-Path: Delivered-To: apmail-couchdb-user-archive@www.apache.org Received: (qmail 27408 invoked from network); 28 Sep 2010 00:56:13 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 28 Sep 2010 00:56:13 -0000 Received: (qmail 71549 invoked by uid 500); 28 Sep 2010 00:56:12 -0000 Delivered-To: apmail-couchdb-user-archive@couchdb.apache.org Received: (qmail 71501 invoked by uid 500); 28 Sep 2010 00:56:11 -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 71493 invoked by uid 99); 28 Sep 2010 00:56:11 -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 00:56:11 +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 74.125.83.52 as permitted sender) Received: from [74.125.83.52] (HELO mail-gw0-f52.google.com) (74.125.83.52) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 28 Sep 2010 00:56:05 +0000 Received: by gwj20 with SMTP id 20so2478149gwj.11 for ; Mon, 27 Sep 2010 17:55:44 -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=eJV56xNaxzjkSRh1lc5fu/xfX78CrI+y5wUK9Fm9t7I=; b=xepm+sBDVQNwkRnbbCy/dItsttS2nz6NehJvKy0x8GfnApT/vU6kTffc3Tfwjf7NcB rmWPqjrCenivtWyeX6Hydf8pPFUzsgIXdh4yovxEwrZ3fu+YtAke5XNwPPK66QE2xHYS HZH5a8XbPPlfQICwaSw7iVcL4Ebq24KM/iHzw= 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=Iom+PnU09dGfVw8OXixzcPtfF/vagZdgdCXyn+djUTHmhgpTNJVH9QugwqHAgDwg1W C4QWeup+DSFU6V9GkSJhT+AT2PrmFsTZXbaiAZt4iN4WXm9WxyRzrZhrpwSsMTzPxNGl sVr1cjTm2Idj8uUEtHnSg045mz/WGRxqdOdnY= MIME-Version: 1.0 Received: by 10.151.38.20 with SMTP id q20mr10087633ybj.124.1285635343949; Mon, 27 Sep 2010 17:55:43 -0700 (PDT) Received: by 10.150.227.2 with HTTP; Mon, 27 Sep 2010 17:55:43 -0700 (PDT) In-Reply-To: References: Date: Mon, 27 Sep 2010 17:55:43 -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 I *think* that instead of using inclusive_end, you want to have endkey=["AA", {}] . The {} is considered to come after all other key values. Per my understanding, inclusive_end is for when you know *exactly* what key you want to stop on. Eli On Mon, Sep 27, 2010 at 5: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 > > 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"}} > > 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! > -- Eli