Hi Michael, On 11/09/2010 07:14 AM, Michael Zedeler wrote: > Hi CouchDB-users (and developers). > > Thanks for a great product and very useful discussions on the mailing list. > > Does anyone know if there has been an effort into making > multi-dimensional queries possible? > > Given a d-dimensional keyspace, I'd like to be able to get all elements > in a d-dimensinal hypercube. It could be implemented using kd-trees. > > Any thoughts? > > Regards, > > Michael. >
You could use an kd-tree, though I'd prefer a multidimensional variation of the r-tree. The reason is, that the kd-tree is space partitioning, which means you need to know the range the keys are in upfront (or do some tricks which will make it more like an r-tree). In an r-tree you partition the data, so your data structure grows as data from outside the current maximum range comes in. I'd love to see a multidimensional index, but atm I'm still busy with my 2-dimensional index. So if you'd like to hack on it and need any help, let me know. Cheers, Volker
