Closed yxngl closed 5 years ago
Many thanks @yxngl.
New to master is a new method, size()
, which returns the number of items added to the index. I have not added a check in hnsw_search
to compare size()
with k
to maintain backwards compatibility with older index objects.
I will create a new CRAN release with this PR shortly, but will look to see if the underlying hnsw library can be brought up to date also.
Release 0.2.0, which includes the PR and the addition of the size
method is now on CRAN.
The maximum k should check against the number of items in the index, but there does not seem to be a way to get that number. Currently, it prevents searching with one single data point.