incubator-couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jason Davies <>
Subject Re: Filtering a cloud of points
Date Wed, 04 Mar 2009 14:36:33 GMT
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  

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

View raw message