weavatrix-search-vector 0.2.0

Persistent, mutable, bounded vector candidate search for Rust and Weavatrix
Documentation
#![deny(unsafe_code)]
#![doc = include_str!("../README.md")]

mod config;
mod distributed;
mod embedding;
mod error;
mod exact;
mod graph;
mod hnsw;
mod metadata;
#[allow(unsafe_code)]
mod mmap;
mod mutable;
mod parallel;
mod quantized;
#[allow(unsafe_code)]
mod simd;
mod storage;
mod vector;

pub use config::{DistanceMetric, IndexConfig};
pub use distributed::{DistributedConfig, DistributedIndex, SearchShard};
pub use embedding::{EmbeddingIndex, EmbeddingProvider};
pub use error::SearchError;
pub use exact::ExactIndex;
pub use graph::{KnnGraph, NeighborEdge};
pub use hnsw::VectorIndex;
pub use metadata::{Metadata, MetadataFilter, MetadataIndex, MetadataValue};
pub use mutable::{MutableVectorIndex, MutationOutcome, VectorRecord};
pub use quantized::ScalarQuantizedIndex;
pub use storage::{MappedVectorIndex, SnapshotValidation};

/// One nearest-neighbor result. Lower distance is better.
#[derive(Debug, Clone, Copy, PartialEq)]
pub struct SearchHit {
    /// Stable caller-provided vector key.
    pub key: u64,
    /// Cosine distance in the inclusive range `0.0..=2.0`.
    pub distance: f32,
}