refactor: remove 3,700+ LOC of unused HNSW implementations

Delete dead code island that was never instantiated in production:
- OptimizedHNSWIndex (430 LOC)
- PartitionedHNSWIndex (412 LOC)
- DistributedSearchSystem (635 LOC)
- ScaledHNSWSystem (744 LOC)
- HNSWIndexOptimized (585 LOC)
- brainy-backup.ts stale example (903 LOC)

Also upgrades entry point recovery from O(n) to O(1) using existing
highLevelNodes index structure.

Production uses only: HNSWIndex (memory) and TypeAwareHNSWIndex (persistent)
This commit is contained in:
David Snelling 2025-11-25 15:36:49 -08:00
parent 52eae67cb8
commit e3146ce11d
10 changed files with 47 additions and 3774 deletions

View file

@ -346,14 +346,10 @@ import type {
StorageAdapter
} from './coreTypes.js'
// Export HNSW index and optimized version
// Export HNSW index
import { HNSWIndex } from './hnsw/hnswIndex.js'
import {
HNSWIndexOptimized,
HNSWOptimizedConfig
} from './hnsw/hnswIndexOptimized.js'
export { HNSWIndex, HNSWIndexOptimized }
export { HNSWIndex }
export type {
Vector,
@ -365,7 +361,6 @@ export type {
HNSWNoun,
HNSWVerb,
HNSWConfig,
HNSWOptimizedConfig,
StorageAdapter
}