Searching using the LAESA index.
echo "generating random numbers and saving them to text files"
metricknn \
-query_vectors_random 20000 5 0 100 uint8 \
-reference_vectors_random 20000 5 0 100 uint8 \
-query_print_txt 20000vec_5d_v1.txt \
-reference_print_txt 20000vec_5d_v2.txt
echo "testing linear scan (it should take a few seconds)"
metricknn \
-query_vectors_file 20000vec_5d_v1.txt uint8 \
-reference_vectors_file 20000vec_5d_v2.txt uint8 \
-distance L1 \
-knn 3 \
-threads 1 \
-no_print_knn
if [[ $? -ne 0 ]]; then exit 1; fi
echo "testing laesa (it should be faster than linear scan)"
metricknn \
-query_vectors_file 20000vec_5d_v1.txt uint8 \
-reference_vectors_file 20000vec_5d_v2.txt uint8 \
-distance L1 \
-knn 3 \
-threads 1 \
-no_print_knn \
-index "LAESA,num_pivots=2"
if [[ $? -ne 0 ]]; then exit 1; fi
echo "all ok"