code: public NearestNeighborsResults knn(int index, int k) throws Exception {
          NearestNeighborRequest request = new NearestNeighborRequest();
          request.setInputIndex(index);
          request.setK(k);
          HttpRequestWithBody req = Unirest.post(url + "/knn");
          req.header("accept", "application/json")
                  .header("Content-Type", "application/json").body(request);
          addAuthHeader(req);
  
          NearestNeighborsResults ret = req.asObject(NearestNeighborsResults.class).getBody();
          return ret;
      }
docs: Runs knn on the given index
  with the given k (note that this is for data
  already within the existing dataset not new data)
  @param index the index of the
  EXISTING ndarray
  to run a search on
  @param k the number of results
  @return
  @throws Exception