You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Keep external u64 doc id at the searcher result boundary.
Acceptance
HNSW graph RAM drops by ~50% on the neighbour arrays.
Candidate heap packed format (X-04) becomes natural.
References
Lucene uses int ordinals throughout vector index.
Qdrant uses u32 PointOffset.
Task list (2026-07-10 restart, full-scope route)
Context: sub-issue #709 (in-memory-only HnswGraph narrowing) was measured mixed and closed wontfix (2026-05-26). Its post-mortem concluded the remaining scope only has a chance as a bundled full-stack change (writer + searcher + IVF + on-disk format together), or as a cleanup without a perf gate. Since then, store-level VectorStore::search benchmarks (±0.06–3.5% same-code spread) give far better measurement than the raw HNSW benches #709 had to use (±6–19%).
Phase 0: Investigation & opportunity-ceiling gate
Full ID dataflow map (graph / writer / searcher / IVF / flat / quantized / store) with file:line, classified as in-memory build / in-memory search / on-disk / API boundary
On-disk format inventory: every site serializing ids, versioning/compat mechanisms, merge path
Public API & bindings boundary check (no u32 leak; interaction with the shared u64 RoaringTreemap deletion bitmap)
Capacity invariants (u32 segment caps, id monotonicity, segment-local vs global ids)
Cross-cutting data-structure rewrite tracked under #537.
Current state
Doc IDs flow through the vector index as
u64:HnswGraph::id_to_index: AHashMap<u64, usize>andnodes: Vec<Vec<Vec<u64>>>(vector/index/hnsw/graph.rs:21,27).ConcurrentHnswGraph::nodes: HashMap<u64, Vec<RwLock<Vec<u64>>>>(vector/index/hnsw/writer.rs:40-41).id: u64.Vec<(u64, String, Vector)>.A single vector segment is capped at u32 entries elsewhere (IVF / Flat headers use
vector_count: u32); the u64 is unnecessary inside the index.Proposed direction
InternalId(u32)withTryFrom<u64>at the segment boundary.Vec<u32>(50% saving vsVec<u64>).Vec<u32>.Vec<u32>.u64doc id at the searcher result boundary.Acceptance
References
intordinals throughout vector index.u32 PointOffset.Task list (2026-07-10 restart, full-scope route)
Context: sub-issue #709 (in-memory-only HnswGraph narrowing) was measured mixed and closed wontfix (2026-05-26). Its post-mortem concluded the remaining scope only has a chance as a bundled full-stack change (writer + searcher + IVF + on-disk format together), or as a cleanup without a perf gate. Since then, store-level
VectorStore::searchbenchmarks (±0.06–3.5% same-code spread) give far better measurement than the raw HNSW benches #709 had to use (±6–19%).Phase 0: Investigation & opportunity-ceiling gate
Phase 1: Implementation plan
Phase 2+: Implementation
2bd48afb): Deletion Search −56/−61%, sparse-id case −86%, multi-field −7%