nmslib / nmslib

Non-Metric Space Library (NMSLIB): An efficient similarity search library and a toolkit for evaluation of k-NN methods for generic non-metric spaces.
Apache License 2.0
3.42k stars 453 forks source link

Less than k results returned #501

Open xiankgx opened 3 years ago

xiankgx commented 3 years ago

Hi, I'm trying to use nmslib to return nearest neighbours less than a certain threshold distance. To do this, I am setting a high value for k. I found that the number of returned results sometimes can be less than k, and also some query samples could have less returned results than others. Is this expected behaviour? I'm using the hnsw method.

joaorulff commented 3 years ago

Hello

Any updates on this issue? I'm having the same problem.

Thanks!

searchivarius commented 3 years ago

@joaorulff sorry, not yet.

emreyalvac commented 2 years ago

Hi,

I'm having the same issue. Any update?

Thanks

searchivarius commented 2 years ago

Hi @emreyalvac sorry, no. This one is not a high priority issue.

ogrisel commented 1 year ago

@searchivarius Is this a fundamental problem of the method or an implementation bug?

searchivarius commented 1 year ago

@ogrisel you need a special hack to fix this. In principle, it is possible to do something and even better than just sample randomly missing entries, but it's extra work and an extension for the algorithm.