hnswlib
A standalone C++ header-only library maintained by the authors of the HNSW algorithm. It implements the Hierarchical Navigable Small World (HNSW) approximate nearest neighbor search algorithm and is referenced or used by many vector databases.
Timeline (last 90 days)
HNSW's search operation clamps the beam width to at least k, consistent with hnswlib's parameter documentation: ef cannot be set smaller than the query's number of nearest neighbors k.
pgvector's HNSW index implementation references hnswlib's algorithms and defaults, but rather than directly embedding that library, it was rewritten in C and adapted to the Postgres storage layer.
The hnswlib documentation states that a higher ef makes search more accurate and slower, and that it cannot be less than k; this description can basically be carried over to understanding pgvector's hnsw.ef_search.
All Facts (3)
HNSW's search operation clamps the beam width to at least k, consistent with hnswlib's parameter documentation: ef cannot be set smaller than the query's number of nearest neighbors k.
50%Unverifiedpgvector's HNSW index implementation references hnswlib's algorithms and defaults, but rather than directly embedding that library, it was rewritten in C and adapted to the Postgres storage layer.
50%UnverifiedThe hnswlib documentation states that a higher ef makes search more accurate and slower, and that it cannot be less than k; this description can basically be carried over to understanding pgvector's hnsw.ef_search.
50%