Expand description
HNSW (Hierarchical Navigable Small World) vector index.
Re-exports§
pub use checkpoint::HnswCheckpointConfig;pub use checkpoint::HnswSnapshot;pub use search_context::HnswSearchContext;
Modules§
- alias
- Index alias management for zero-downtime HNSW index migration.
Blue-green swap via atomic pointer exchange; see
docs/alias.md. - arena
- Bump arena allocator for zero-allocation HNSW search. Fixed-size slab with O(1) reset; not thread-safe by design.
- checkpoint
- HNSW index checkpointing — snapshots for crash recovery and warm-start restores.
- error
- Error types for the HNSW crate.
- metrics
- Metrics infrastructure for HNSW observability.
Pluggable
MetricsSinktrait for insert, search, and rebuild telemetry. - search_
context - Pre-allocated search buffers for HNSW search.
Structs§
- Hnsw
Config - HNSW index configuration parameters. Deserialization validates all invariants; invalid configs are rejected with a descriptive error.
- Hnsw
Index - In-memory HNSW vector index with tombstone-based lazy deletion.
Nodes use internal
usizeIDs for O(1) lookups;NodeId↔usizemaps live at the API boundary. - NodeId
- Serializes as a 32-character lowercase hex string (compatible with the
snapshot format used by
HnswSnapshot). - Rebuild
Stats - Statistics returned from a rebuild operation.
- Tombstone
Stats - Statistics about tombstoned nodes in an HNSW index.
Enums§
- Distance
Metric - Distance metric for vector similarity search.