lmcinnes / pynndescent

A Python nearest neighbor descent for approximate nearest neighbors
BSD 2-Clause "Simplified" License
899 stars 105 forks source link

How to have a payload associated with each vector? #202

Closed habedi closed 2 years ago

habedi commented 2 years ago

Hi!

I want to build an index of a database of high-dimensional numerical vectors, and do an approximate KNN search over the vectors. Each vector has a payload associated with it. By payload, I mean extra information such as timestamps, unique ID of each vector, etc. Now, I'm not sure how it should be done. It seems to me that pynndescent.NNDescent only uses the vectors as its first argument.

Any suggestion on how to add a payload to each vector while building an index?

BTW, thank you for the great work. An approximate KNN search library in Python saves many lives. :)