You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I was playing around with the filter kwarg, and found that the kwarg will only accept a single function as a filter, whereas the knn_query will accept a vector of queries. It may be the case that we want to apply a different filter to each query, something like this...
queries = np.random.normal(size=(128, 8))
idx, dists = hnswlib.knn_query(queries, k=16, filter=[lambda idx: idx < i for i in range(128)]
Is this something which should be supported internally in the lib? Or should I just use pythons map() to make different knn_queries for each filter function?
The text was updated successfully, but these errors were encountered:
I was playing around with the filter kwarg, and found that the kwarg will only accept a single function as a filter, whereas the
knn_query
will accept a vector of queries. It may be the case that we want to apply a different filter to each query, something like this...Is this something which should be supported internally in the lib? Or should I just use pythons
map()
to make different knn_queries for each filter function?The text was updated successfully, but these errors were encountered: