Highways and local streets
Hierarchical Navigable Small World builds a graph of nearby vectors across layers. A search starts in a sparse upper layer, navigates toward promising neighbors, and descends to denser layers for a more detailed search.
It is approximate: the speedup comes with a possibility of missing the exact nearest neighbors. Depending on the query and collection, Qdrant can also choose a full scan rather than HNSW.
Build-time and query-time choices
The m parameter influences graph connectivity; ef_construct controls the candidate search during construction. Larger values can improve search quality but increase index size or build cost. Changing graph settings requires rebuilding the affected index.
At query time, hnsw_ef controls the search candidate list and can be tuned without rebuilding. We started with m = 16 and ef_construct = 100, and treated changes as experiments to benchmark against our data.