annoy-java icon indicating copy to clipboard operation
annoy-java copied to clipboard

Support search_k

Open erikbern opened this issue 9 years ago • 0 comments

Something that was very useful in the C++ version was to let the user manually provide a search_k limit. Cf

https://github.com/spotify/annoy/blob/master/src/annoylib.h#L541 https://github.com/spotify/annoy-java/blob/master/src/main/java/com/spotify/annoy/ANNIndex.java#L147

That way you can ask for the 10 nearest neighbors and tell Annoy to inspect 100k items etc

erikbern avatar Mar 07 '16 23:03 erikbern