This is a question from theory community, but I came across this issue in a practical problem. So just have this in mind. I have a set of real vectors: $$S = \lbrace v_1, \dots, v_n \rbrace $$$v_i \in \mathbb{R}^d$ where $d \approx 100$. Typically the size of this set, $n$ is around 20,000,000: In practice if I have $v_1$ and $v_2$, I can find the distances between them (say using Euclidean distance).Consider a different problem: I have $v_i \in S$ and I want to find all of the $k$ ($\approx 20$) closest vectors to $v_i$ in the $S$. Any efficient algorithm/technique/datastructure for this purpose? I am interested in either piratical solutions and theoretical results. Even if you have approximate solutions I am interested in.Update: Here is a similar question I came across but I think they are different: Calculating the distance to the kth nearest neighbor for all points in the set 
k closest points that belong to a set
ds.algorithms;approximation algorithms;cg.comp geom;linear algebra