High-dimensional data indexing with applications