Nearest neighbor search unfinished.