Open betterenvi opened 6 years ago
search_knn
will use Euclidean distance as a default if no own dist
function is provided, see
search_nn
calls search_knn
and passes along its dist
parameter.
Maybe I'm missing something here. Can you please elaborate?
If no own dist
function is provided, everything is fine. The API will break if dist
function is provided and is not squared Euclidean distance, because the implementation uses this distance.
I have implemented a fix in #43, which should address this issue. Please let me know if this works for you.
In
search_knn
andsearch_nn
, the APIs have an arg nameddist
, and the API docs sayBut in the implementations of the two APIs, only squared Euclidean distance is considered.