I was searching the last few days for a stable implementation of the R-Tree with support of unlimited dimensions (20 or so would be enough). I only found this http://sourcef
You can use PostgreSQL’s Generalized Search Tree indexing facility.
GiST Quick demo