vicinity
Nearest-neighbor search.
[]
= { = "0.3", = ["hnsw"] }
use HNSWIndex;
let mut index = builder
.m
.ef_search
.auto_normalize
.build?;
index.add_slice?;
index.add_slice?;
index.build?;
let results = index.search?;
Benchmark
HNSW (M=16) on GloVe-25 (1.18M vectors, 25-d, cosine):
63–99% recall@10 at 800–1500 QPS. Brute force provides the recall=1.0 baseline at ~42 QPS. Full numbers in doc/benchmark-results.md.
Algorithms
Stable: HNSW, NSW, IVF-PQ, PQ, RaBitQ, SQ8.
Experimental (behind feature flags): Vamana/DiskANN, SNG, DEG, ScaNN, KD-Tree, Ball Tree, RP-Forest, K-Means Tree.
Each algorithm is behind its own feature flag. Default: hnsw. Additional flags: nsw, ivf_pq, scann, diskann, vamana, quantization, rabitq, saq, persistence, parallel, experimental, python.
See docs.rs for the full API and doc/benchmark-results.md for numbers.
License
MIT OR Apache-2.0