HSNW: Fix adding node with binary quants.

This commit is contained in:
antirez 2025-01-27 20:03:14 +01:00
parent 7cfd894f3a
commit 5c23f59ee3
1 changed files with 1 additions and 1 deletions

2
hnsw.c
View File

@ -1990,7 +1990,7 @@ hnswNode *hnsw_insert_serialized(HNSW *index, void *vector, uint64_t *params, ui
/* Create node, passing vector data directly based on quantization type. */
hnswNode *node;
if (index->quant_type == HNSW_QUANT_Q8) {
if (index->quant_type != HNSW_QUANT_NONE) {
node = hnsw_node_new(index, id, NULL, vector, 0, level);
} else {
node = hnsw_node_new(index, id, vector, NULL, 0, level);