Hierarchical Navigable Small World (HNSW) is a graph-based approximate nearest neighbor (ANN) algorithm used by OpenSearch Retrieval Engine Edition for vector search. This reference describes the parameters that control index building and search behavior.
Index building parameters
| Parameter | Type | Default | Description |
|---|
proxima.hnsw.builder.max_neighbor_count | uint32 | 100 | The maximum number of neighbors per node in the graph. Higher values improve graph connectivity but increase index size and build time. |
proxima.hnsw.builder.efconstruction | uint32 | 500 | The size of the candidate pool scanned when inserting each node during index building. Higher values produce a higher-quality graph but slow down index building. Start with 400 for initial testing. |
proxima.hnsw.builder.thread_count | uint32 | 0 | The number of threads used for index building. When set to 0, defaults to the number of CPU cores on the OpenSearch Retrieval Engine Edition instance. |
HnswSearcher parameters
| Parameter | Type | Default | Description |
|---|
proxima.hnsw.searcher.ef | uint32 | 500 | The number of nearest neighbor candidates scanned during a search. Higher values increase the retrieval ratio but slow down queries. Set within the range [100, 1000] based on your retrieval ratio and latency requirements. |