pub struct Match {
pub key: Vec<u8>,
pub distance: f32,
}Expand description
One answer from a search.
Fields§
§key: Vec<u8>The key the vector was put under.
distance: f32How far it is, measured against the full precision vector rather than against its code.
For Metric::L2 that is the euclidean distance. For
Metric::Cosine it is one minus the cosine similarity, so 0 is the
same direction and 2 is the opposite one. Both are distances, so nearer
is smaller and the answers come back in that order.
Trait Implementations§
impl StructuralPartialEq for Match
Auto Trait Implementations§
impl Freeze for Match
impl RefUnwindSafe for Match
impl Send for Match
impl Sync for Match
impl Unpin for Match
impl UnsafeUnpin for Match
impl UnwindSafe for Match
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