Skip to content

Commit 6387134

Browse files
authored
Fix: Skip key rewrites in index_gt::update (#679)
Relates to #678 Co-authored-by: Yoonseok Kim <[email protected]>
1 parent c001112 commit 6387134

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

include/usearch/index.hpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2987,7 +2987,8 @@ class index_gt {
29872987
}
29882988
form_reverse_links_(metric, updated_slot, closest_view, value, level, context);
29892989
}
2990-
updated_node.key(key);
2990+
if (static_cast<vector_key_t>(updated_node.key()) != key)
2991+
updated_node.key(key);
29912992

29922993
// Normalize stats
29932994
result.computed_distances = context.computed_distances - result.computed_distances;

0 commit comments

Comments
 (0)