Skip to main content

Crate khive_hnsw

Crate khive_hnsw 

Source
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 MetricsSink trait for insert, search, and rebuild telemetry.
search_context
Pre-allocated search buffers for HNSW search.

Structs§

HnswConfig
HNSW index configuration parameters. Deserialization validates all invariants; invalid configs are rejected with a descriptive error.
HnswIndex
In-memory HNSW vector index with tombstone-based lazy deletion. Nodes use internal usize IDs for O(1) lookups; NodeIdusize maps live at the API boundary.
NodeId
Serializes as a 32-character lowercase hex string (compatible with the snapshot format used by HnswSnapshot).
RebuildStats
Statistics returned from a rebuild operation.
TombstoneStats
Statistics about tombstoned nodes in an HNSW index.

Enums§

DistanceMetric
Distance metric for vector similarity search.