pub struct Neighbor {
pub id: VectorId,
pub score: f32,
}Expand description
A single search result: a vector identity paired with its distance score.
Scores follow the engine-wide ascending ranking convention (smaller =
closer), matching crate::Metric. For L2 the score is squared
Euclidean distance; for InnerProduct it is the negated dot product; for
Cosine it is 1 − cos.
Fields§
§id: VectorIdIdentity of the matched vector.
score: f32Distance score (ascending: smaller is closer).
Implementations§
Trait Implementations§
impl Copy for Neighbor
impl StructuralPartialEq for Neighbor
Auto Trait Implementations§
impl Freeze for Neighbor
impl RefUnwindSafe for Neighbor
impl Send for Neighbor
impl Sync for Neighbor
impl Unpin for Neighbor
impl UnsafeUnpin for Neighbor
impl UnwindSafe for Neighbor
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more