title: searching for k nearest points
body: <p>I have a large set of features that looks like this:</p>
  
  <pre><code>id1 28273 20866 29961 27190 31790 19714 8643 14482 5384 ....  upto 1000
  id2 12343 45634 29961 27130 33790 14714 7633 15483 4484 ....  
  id3 ..... ..... ..... ..... ..... ..... .... ..... .... .... .   .   .
  ...
  id200000 .... .... ... ..  .  .  .  .
  </code></pre>
  
  <p>I want to compute for each id euclidean distance and sort them to find the 5-nearest points.
  Because my dataset is very large. what is the best way to do it. </p>