Commit 9d5efc7
fix: searchHybrid returns excess docs + delete leaks trigram/word entries
searchHybrid(): after re-ranking and truncating to limit, the docs
slice was never shrunk — callers saw un-re-ranked docs beyond the
limit boundary. Now properly truncates the slice.
delete(): removed from all data indexes (hash_idx, BTree, key_doc_ids,
key_epochs, cache) but never cleaned up trigram or word index entries.
Deleted files persisted as phantom search candidates, wasting memory
and causing unnecessary candidate filtering on every search.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>1 parent 98a84f2 commit 9d5efc7
1 file changed
Lines changed: 4 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
670 | 670 | | |
671 | 671 | | |
672 | 672 | | |
| 673 | + | |
| 674 | + | |
673 | 675 | | |
674 | 676 | | |
675 | 677 | | |
| |||
1103 | 1105 | | |
1104 | 1106 | | |
1105 | 1107 | | |
1106 | | - | |
| 1108 | + | |
1107 | 1109 | | |
1108 | 1110 | | |
1109 | 1111 | | |
| |||
1150 | 1152 | | |
1151 | 1153 | | |
1152 | 1154 | | |
1153 | | - | |
1154 | 1155 | | |
1155 | | - | |
1156 | | - | |
| 1156 | + | |
1157 | 1157 | | |
1158 | 1158 | | |
1159 | 1159 | | |
| |||
0 commit comments