Skip to main content

Module persistence

Module persistence 

Source
Expand description

Index persistence helpers for saving/loading indexes to storage

This module provides utilities for persisting trained indexes to object storage and loading them back, enabling:

  • Cold start without retraining
  • Index sharing across instances
  • Checkpoint/restore workflows

Structs§

HnswConfigSnapshot
Serializable snapshot for HNSW configuration only (lightweight) Note: For full graph persistence, use HnswFullSnapshot instead
HnswFullSnapshot
Full HNSW graph snapshot for complete persistence This allows loading the index without rebuilding the graph
IndexPersistenceManager
Index persistence manager for saving/loading indexes to object storage
IvfFullSnapshot
Full IVF index snapshot for complete persistence This allows loading the trained index without retraining
IvfTrainingSnapshot
Serializable snapshot for IVF index training data
PQSnapshot
Serializable snapshot of a ProductQuantizer (the trained codebooks)
SerializableHnswNode
Serializable representation of an HNSW node
SerializableIndexedVector
Serializable representation of an indexed vector in IVF
SpFreshFullSnapshot
Full SPFresh index snapshot for complete persistence This allows loading the trained index with all clusters and vectors
SpFreshTrainingSnapshot
Serializable snapshot for SPFresh index training data

Enums§

IndexType
Index types that can be persisted

Traits§

Persistable
Trait for indexes that can be persisted

Functions§

deserialize_from_bytes
Helper to deserialize from bytes to any DeserializeOwned type
serialize_to_bytes
Helper to serialize any Serialize type to bytes