Return-Path: Delivered-To: apmail-couchdb-user-archive@www.apache.org Received: (qmail 24857 invoked from network); 4 Mar 2009 14:37:08 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 4 Mar 2009 14:37:08 -0000 Received: (qmail 88389 invoked by uid 500); 4 Mar 2009 14:37:05 -0000 Delivered-To: apmail-couchdb-user-archive@couchdb.apache.org Received: (qmail 88357 invoked by uid 500); 4 Mar 2009 14:37:05 -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 88346 invoked by uid 99); 4 Mar 2009 14:37:05 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 04 Mar 2009 06:37:05 -0800 X-ASF-Spam-Status: No, hits=2.8 required=10.0 tests=SPF_PASS,WEIRD_QUOTING X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of jason@jasondavies.com designates 89.145.97.179 as permitted sender) Received: from [89.145.97.179] (HELO www1.netspade.com) (89.145.97.179) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 04 Mar 2009 14:36:56 +0000 Received: from jddavies.gotadsl.co.uk ([82.133.112.184] helo=[10.0.0.14]) by www1.netspade.com with esmtpa (Exim 4.69) (envelope-from ) id 1LesHe-00081y-31 for user@couchdb.apache.org; Wed, 04 Mar 2009 14:41:18 +0000 Message-Id: From: Jason Davies To: user@couchdb.apache.org In-Reply-To: <20090304111938.GC16406@banot.net> Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Mime-Version: 1.0 (Apple Message framework v930.3) Date: Wed, 4 Mar 2009 14:36:33 +0000 References: <20090304111938.GC16406@banot.net> X-Mailer: Apple Mail (2.930.3) X-SA-Exim-Connect-IP: 82.133.112.184 X-SA-Exim-Mail-From: jason@jasondavies.com X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on www1.netspade.com X-Spam-Level: Subject: Re: Filtering a cloud of points X-SA-Exim-Version: 4.2.1 (built Wed, 25 Jun 2008 17:14:11 +0000) X-SA-Exim-Scanned: Yes (on www1.netspade.com) X-Virus-Checked: Checked by ClamAV on apache.org X-Old-Spam-Status: No, score=-3.8 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00, WEIRD_QUOTING autolearn=no version=3.2.5 Hi Manuel, On 4 Mar 2009, at 11:19, Manuel UGFkcsOzbiBNYXLhcnTDrW5leg== wrote: > And tried to filter with start - end key (for example : > startkey=[[1],[0]]&endkey=[[3],[5]]) but I > get points that are out of region (like [[1][9]]). > I've also tried with objects, simple vectos ([X,Y]) and still the > same results. > > Anyone knows how to solve it? There any way ? Or should I make a > view for X coordinate, another for Y > coordinate and try to make a ""join"" in my program? CouchDB's views produce a linear (one-dimensional) keyspace, so multi- dimensional queries like this are currently not possible, unless, as you say, you do two separate queries on the X-keyspace and the Y- keyspace and then compute the intersection of the results in your client. There has been talk of supporting view intersections but at the moment this is still being discussed/dreamed of :-) Essentially this would allow us to do a single query that performs two view queries on separate linear keyspaces and then intersects them server-side. The obvious advantage here is that the discarded data doesn't needlessly get transferred across the wire. -- Jason Davies www.jasondavies.com