Commit 6e791c7
fix: Rebuild HNSW index from persisted storage on VectorDB init
This fixes issue #30 where search() returned empty results after
application restart when using storagePath persistence.
Changes:
- Modified VectorDB::new() to rebuild index from persisted vectors
- Uses storage.all_ids() and index.add_batch() for efficient rebuilding
- Added regression test test_search_after_restart
- Bumped version to 0.1.17
- Added ARM64 GNN npm package structure
The fix loads all persisted vectors and rebuilds the HNSW index
on initialization, ensuring search() works correctly after restart.
Fixes #30
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <[email protected]>1 parent 8c3c9a3 commit 6e791c7
7 files changed
Lines changed: 216 additions & 46 deletions
File tree
- crates
- ruvector-core/src
- ruvector-gnn-node
- npm
- linux-arm64-gnu
- linux-x64-gnu
- ruvector-node
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
| 29 | + | |
29 | 30 | | |
30 | 31 | | |
31 | 32 | | |
32 | 33 | | |
33 | 34 | | |
34 | 35 | | |
35 | | - | |
| 36 | + | |
36 | 37 | | |
37 | 38 | | |
38 | 39 | | |
| |||
0 commit comments