Hierarchical Navigable Small World (HNSW)
Hierarchical Navigable Small World (HNSW) indexing is a graph-based approach that significantly enhances search efficiency in high-dimensional vector spaces. By structuring data in a navigable small-world graph, HNSW enables rapid nearest-neighbor searches, making it a preferred choice for large-scale vector retrieval tasks.
To configure document store to use HNSW index, post a request to the `/api/kb/<storeName>/index` endpoint and specify `HNSW` as the value of the `type` property:
http request
POST /api/kb/<storeName>/index
{
"type": "HNSW",
"spaceName": "COSINE",
"efConstruction": 200,
"efSearch": 50,
"m": 16
}
Technically, all properties other than `type` in the payload above can be omitted, as they use the default values.