From 2a31ca9cb1cef1a760ffbf609c131ffe08473d5f Mon Sep 17 00:00:00 2001 From: Carterla8 <109740614+Carterla8@users.noreply.github.com> Date: Sat, 1 Apr 2023 08:05:00 +0100 Subject: [PATCH] Update RawAnnoyQueryIndex.scala Simple suggestion to improve comment. --- .../scala/com/twitter/ann/annoy/RawAnnoyQueryIndex.scala | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/ann/src/main/scala/com/twitter/ann/annoy/RawAnnoyQueryIndex.scala b/ann/src/main/scala/com/twitter/ann/annoy/RawAnnoyQueryIndex.scala index 9fc65ddf7..e47ec06c1 100644 --- a/ann/src/main/scala/com/twitter/ann/annoy/RawAnnoyQueryIndex.scala +++ b/ann/src/main/scala/com/twitter/ann/annoy/RawAnnoyQueryIndex.scala @@ -118,9 +118,8 @@ private[this] class RawAnnoyQueryIndex[D <: Distance[D]]( } } - // Annoy java lib do not expose param for numOfNodesToExplore. - // Default number is numOfTrees*numOfNeigbours. - // Simple hack is to artificially increase the numOfNeighbours to be requested and then just cap it before returning. + // The annoy-java lib does not expose the param for numOfNodesToExplore (the default value is numOfTrees*numOfNeighbours). + // As a workaround, we can artificially increase the numOfNeighbours to be requested and then cap it before returning. private[this] def neighboursToRequest( numOfNeighbours: Int, annoyParams: AnnoyRuntimeParams