weavatrix-search-vector 0.3.1

Persistent, mutable, bounded vector candidate search for Rust and Weavatrix
Documentation
1
2
3
4
5
6
7
8
9
10
/// One nearest-neighbor result. Lower distance is better.
#[derive(Debug, Clone, Copy, PartialEq)]
pub struct SearchHit {
    /// Stable caller-provided vector key.
    pub key: u64,
    /// Distance under the configured metric. Cosine is in `0.0..=2.0`,
    /// squared Euclidean is non-negative, and dot distance is the negative
    /// inner product.
    pub distance: f32,
}