Return-Path: Delivered-To: apmail-couchdb-user-archive@www.apache.org Received: (qmail 5441 invoked from network); 28 Jun 2010 14:49:39 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 28 Jun 2010 14:49:39 -0000 Received: (qmail 22957 invoked by uid 500); 28 Jun 2010 14:49:36 -0000 Delivered-To: apmail-couchdb-user-archive@couchdb.apache.org Received: (qmail 22571 invoked by uid 500); 28 Jun 2010 14:49:35 -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 22492 invoked by uid 99); 28 Jun 2010 14:49:35 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 28 Jun 2010 14:49:35 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of bra@fsn.hu designates 195.228.252.137 as permitted sender) Received: from [195.228.252.137] (HELO people.fsn.hu) (195.228.252.137) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 28 Jun 2010 14:49:26 +0000 Received: by people.fsn.hu (Postfix, from userid 1001) id F0B72335870; Mon, 28 Jun 2010 16:48:34 +0200 (CEST) X-Bogosity: Ham, tests=bogofilter, spamicity=0.000085, version=1.2.1 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MF-ACE0E1EA [pR: 8.0995] X-CRM114-CacheID: sfid-20100628_16482_691A5F61 X-CRM114-Status: Good ( pR: 8.0995 ) X-DSPAM-Result: Whitelisted X-DSPAM-Processed: Mon Jun 28 16:48:34 2010 X-DSPAM-Confidence: 0.9852 X-DSPAM-Probability: 0.0000 X-DSPAM-Signature: 4c28b642201933667222109 X-DSPAM-Factors: 27, From*Attila Nagy , 0.00286, 0), 0.00820, 1+1, 0.00870, 1+1, 0.00870, User-Agent*rv+1.9.1.9), 0.01000, but+this, 0.01000, 0+11, 0.01000, User-Agent*Thunderbird/3.0.4, 0.01000, 1+and, 0.01000, there+a, 0.01000, obvious, 0.01000, 1+10, 0.01000, User-Agent*1.9.1.9), 0.01000, 96, 0.01000, map, 0.01000, Url*0, 0.01000, Url*0, 0.01000, (and, 0.01000, 0+1, 0.01000, 1+0, 0.02179, does, 0.02509, Received*with+ESMTPSA, 0.03493, Received*ESMTPSA+id, 0.03493, Received*ESMTPSA, 0.03493, (1, 0.03972, doesn't, 0.04428, X-Spambayes-Classification: ham; 0.03 Received: from japan.t-online.private (japan.t-online.co.hu [195.228.243.99]) by people.fsn.hu (Postfix) with ESMTPSA id 5C66E335856 for ; Mon, 28 Jun 2010 16:48:18 +0200 (CEST) Message-ID: <4C28B62E.1040805@fsn.hu> Date: Mon, 28 Jun 2010 16:48:14 +0200 From: Attila Nagy User-Agent: Mozilla/5.0 (X11; U; FreeBSD amd64; en-US; rv:1.9.1.9) Gecko/20100506 Thunderbird/3.0.4 MIME-Version: 1.0 To: user@couchdb.apache.org Subject: inclusive_end howto Content-Type: text/plain; charset=ISO-8859-2; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org Hello, I have an IP space separated equally and indexed with a key (1.1.1.0-1.1.1.10:key 0, .11-.20:key 1, etc). I would like to query the partition 0, but this doesn't work: curl -X GET 'http://localhost:5984/subnet_10-85-0-0$16/_design/dhcp/_view/available?startkey=\[0,null\]&endkey=\[0,null\]' {"total_rows":254,"offset":0,"rows":[]} while this does: curl -X GET 'http://localhost:5984/subnet_10-85-0-0$16/_design/dhcp/_view/available?startkey=\[0,null\]&endkey=\[1,null\]' {"total_rows":254,"offset":0,"rows":[ {"id":"10.85.128.1","key":[0,"10.85.128.1"],"value":null}, {"id":"10.85.128.101","key":[0,"10.85.128.101"],"value":null}, {"id":"10.85.128.103","key":[0,"10.85.128.103"],"value":null}, {"id":"10.85.128.108","key":[0,"10.85.128.108"],"value":null}, {"id":"10.85.128.115","key":[0,"10.85.128.115"],"value":null}, {"id":"10.85.128.117","key":[0,"10.85.128.117"],"value":null}, {"id":"10.85.128.120","key":[0,"10.85.128.120"],"value":null}, {"id":"10.85.128.122","key":[0,"10.85.128.122"],"value":null}, {"id":"10.85.128.129","key":[0,"10.85.128.129"],"value":null}, {"id":"10.85.128.134","key":[0,"10.85.128.134"],"value":null}, {"id":"10.85.128.136","key":[0,"10.85.128.136"],"value":null}, {"id":"10.85.128.14","key":[0,"10.85.128.14"],"value":null}, {"id":"10.85.128.141","key":[0,"10.85.128.141"],"value":null}, {"id":"10.85.128.143","key":[0,"10.85.128.143"],"value":null}, {"id":"10.85.128.148","key":[0,"10.85.128.148"],"value":null}, {"id":"10.85.128.155","key":[0,"10.85.128.155"],"value":null}, {"id":"10.85.128.157","key":[0,"10.85.128.157"],"value":null}, {"id":"10.85.128.16","key":[0,"10.85.128.16"],"value":null}, {"id":"10.85.128.160","key":[0,"10.85.128.160"],"value":null}, {"id":"10.85.128.162","key":[0,"10.85.128.162"],"value":null}, {"id":"10.85.128.169","key":[0,"10.85.128.169"],"value":null}, {"id":"10.85.128.174","key":[0,"10.85.128.174"],"value":null}, {"id":"10.85.128.176","key":[0,"10.85.128.176"],"value":null}, {"id":"10.85.128.181","key":[0,"10.85.128.181"],"value":null}, {"id":"10.85.128.183","key":[0,"10.85.128.183"],"value":null}, {"id":"10.85.128.188","key":[0,"10.85.128.188"],"value":null}, {"id":"10.85.128.195","key":[0,"10.85.128.195"],"value":null}, {"id":"10.85.128.197","key":[0,"10.85.128.197"],"value":null}, {"id":"10.85.128.205","key":[0,"10.85.128.205"],"value":null}, {"id":"10.85.128.207","key":[0,"10.85.128.207"],"value":null}, {"id":"10.85.128.21","key":[0,"10.85.128.21"],"value":null}, {"id":"10.85.128.213","key":[0,"10.85.128.213"],"value":null}, {"id":"10.85.128.218","key":[0,"10.85.128.218"],"value":null}, {"id":"10.85.128.224","key":[0,"10.85.128.224"],"value":null}, {"id":"10.85.128.226","key":[0,"10.85.128.226"],"value":null}, {"id":"10.85.128.23","key":[0,"10.85.128.23"],"value":null}, {"id":"10.85.128.230","key":[0,"10.85.128.230"],"value":null}, {"id":"10.85.128.232","key":[0,"10.85.128.232"],"value":null}, {"id":"10.85.128.239","key":[0,"10.85.128.239"],"value":null}, {"id":"10.85.128.245","key":[0,"10.85.128.245"],"value":null}, {"id":"10.85.128.247","key":[0,"10.85.128.247"],"value":null}, {"id":"10.85.128.251","key":[0,"10.85.128.251"],"value":null}, {"id":"10.85.128.253","key":[0,"10.85.128.253"],"value":null}, {"id":"10.85.128.28","key":[0,"10.85.128.28"],"value":null}, {"id":"10.85.128.3","key":[0,"10.85.128.3"],"value":null}, {"id":"10.85.128.35","key":[0,"10.85.128.35"],"value":null}, {"id":"10.85.128.37","key":[0,"10.85.128.37"],"value":null}, {"id":"10.85.128.40","key":[0,"10.85.128.40"],"value":null}, {"id":"10.85.128.42","key":[0,"10.85.128.42"],"value":null}, {"id":"10.85.128.49","key":[0,"10.85.128.49"],"value":null}, {"id":"10.85.128.54","key":[0,"10.85.128.54"],"value":null}, {"id":"10.85.128.56","key":[0,"10.85.128.56"],"value":null}, {"id":"10.85.128.61","key":[0,"10.85.128.61"],"value":null}, {"id":"10.85.128.63","key":[0,"10.85.128.63"],"value":null}, {"id":"10.85.128.68","key":[0,"10.85.128.68"],"value":null}, {"id":"10.85.128.75","key":[0,"10.85.128.75"],"value":null}, {"id":"10.85.128.77","key":[0,"10.85.128.77"],"value":null}, {"id":"10.85.128.8","key":[0,"10.85.128.8"],"value":null}, {"id":"10.85.128.80","key":[0,"10.85.128.80"],"value":null}, {"id":"10.85.128.82","key":[0,"10.85.128.82"],"value":null}, {"id":"10.85.128.89","key":[0,"10.85.128.89"],"value":null}, {"id":"10.85.128.94","key":[0,"10.85.128.94"],"value":null}, {"id":"10.85.128.96","key":[0,"10.85.128.96"],"value":null} ]} It's obvious that I should give the endkey the IP too to make this work, but I don't know it. I use this map only because I have to make queries like: is 10.85.128.96 in partition 0? (and also, list all entries in partition 0) Is this OK to always query a given partition with startkey=0 and endkey+1 and null as the other key, or is there a cleaner method?