+1 to adding a scoring threshold. I think it could be another parameter to KnnVectorQuery. Do you want to have a try at adding this? If so, please feel free to open a PR and I will be happy to guide you.
On Mon, Nov 7, 2022 at 6:38 AM Alexey Gorlenko <agorlen...@gmail.com> wrote: > > Hi! > > There are some use cases where we need to find vectors with the distance (by > some metric) to the given vector V less than the given threshold T. That task > is very similar to the knn problem, but in this case we don't have a quantity > of the nearest neighbours k. > > As I see, the current implementation of knn doesn't provide such > functionality. But at the first glance it is not very difficult to modify the > method search of HnswGraph to implement that feature (do not limit result > size and get rid of candidates which exceed threshold). > > But maybe that idea has some not obvious problems which I haven't noticed, > and in reality an implementation of that idea would have fundamental > difficulties? > --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org