Multidimensional indexes for nearest-neighbor queries