hnswlib icon indicating copy to clipboard operation
hnswlib copied to clipboard

Only one match

Open bfialkoff opened this issue 2 years ago • 3 comments

I am trying to use this for keypoint feature matching so I know that each query can only be matched to one entry in the Index, is there any way to enforce this behavior?

bfialkoff avatar Jul 26 '22 14:07 bfialkoff

Hi @bfialkoff, I think so. That sound like k=1

yurymalkov avatar Aug 02 '22 04:08 yurymalkov

I don't think so, k=1 means that itll give me only the top nearest vector in the Index. I'm trying to query with N vectors, such that if one of my vectors has been matched to vector i in the index, no other query vector will be mapped to vector i in the index.

bfialkoff avatar Aug 04 '22 09:08 bfialkoff

Oh, I see. I do not think there is currently such a functionality without serious C++ code modification as queries are now processed independently from each other.

yurymalkov avatar Aug 05 '22 06:08 yurymalkov