Add nearest-neighbour search