method_annoy function

An internal function to use Annoy algorithm via the RcppAnnoy package.