weavatrix-search-vector 0.1.0

First-party bounded vector candidate search for Weavatrix
Documentation
#![deny(unsafe_code)]
#![doc = include_str!("../README.md")]

mod config;
mod error;
mod exact;
mod hnsw;
mod parallel;
#[allow(unsafe_code)]
mod simd;
mod vector;

pub use config::{DistanceMetric, IndexConfig};
pub use error::SearchError;
pub use exact::ExactIndex;
pub use hnsw::VectorIndex;

/// 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,
}