mirror of
https://github.com/asg017/sqlite-vec.git
synced 2026-04-25 00:36:56 +02:00
Filter deleted nodes from DiskANN search results and add delete tests
DiskANN's delete repair only fixes forward edges (nodes the deleted node pointed to). Stale reverse edges can cause deleted rowids to appear in search results. Fix: track a 'confirmed' flag on each search candidate, set when the full-precision vector is successfully read during re-ranking. Only confirmed candidates are included in output. Zero additional SQL queries — piggybacks on the existing re-rank vector read. Also adds delete hardening tests: - Rescore: interleaved delete+KNN, rowid_in after deletes, full delete+reinsert cycle - DiskANN: delete+reinsert cycles with KNN verification, interleaved delete+KNN Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
2f4c2e4bdb
commit
b00865429b
4 changed files with 190 additions and 8 deletions
|
|
@ -2586,7 +2586,8 @@ struct Vec0DiskannConfig {
|
|||
struct Vec0DiskannCandidate {
|
||||
i64 rowid;
|
||||
f32 distance;
|
||||
int visited; // 1 if this candidate's neighbors have been explored
|
||||
int visited; // 1 if this candidate's neighbors have been explored
|
||||
int confirmed; // 1 if full-precision vector was successfully read (node exists)
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue