diff --git a/src/nn_parallel.h b/src/nn_parallel.h index 7f5c092c..460963cc 100644 --- a/src/nn_parallel.h +++ b/src/nn_parallel.h @@ -89,10 +89,17 @@ template struct NNWorker { std::vector idx; std::vector dists; +#if ANNOY_VERSION >= Annoy_Version(1,17,3) + Annoy::AnnoyIndex + index; +#else AnnoyIndex index; +#endif NNWorker(const std::string &index_name, const std::vector &mat, std::size_t ncol, std::size_t n_neighbors, std::size_t search_k)