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