1 | initial version |
Yes, use k=2 (and then first look at the first match, if it is the same index then take the second closest match), since you build your index with the same cluster_data as you are doing your knnSearch, i.e. you match the same data with each other. Thus, the first result will with very high probability be the same index since it is typically the closest one.
Btw.: I'd raise or at least try out other branching factors and number of iterations for your KMenasIndexParams, 8 and 4 seem pretty low.