pub struct ResidentIndex { /* private fields */ }Expand description
An in-memory int8 snapshot of the vectors of one model. See the module documentation.
Implementations§
Source§impl ResidentIndex
impl ResidentIndex
Sourcepub fn nearest(
&self,
query: &[f32],
limit: usize,
) -> Result<Vec<Nearest>, VectorError>
pub fn nearest( &self, query: &[f32], limit: usize, ) -> Result<Vec<Nearest>, VectorError>
The limit rows with the highest cosine similarity to query, best first. Ties are
ordered by key, as VectorStore::nearest orders them. A zero query or zero row scores
0. Nearest::vector is the dequantised row.
Trait Implementations§
Source§impl Clone for ResidentIndex
impl Clone for ResidentIndex
Source§impl Debug for ResidentIndex
impl Debug for ResidentIndex
Source§impl PartialEq for ResidentIndex
impl PartialEq for ResidentIndex
impl StructuralPartialEq for ResidentIndex
Auto Trait Implementations§
impl Freeze for ResidentIndex
impl RefUnwindSafe for ResidentIndex
impl Send for ResidentIndex
impl Sync for ResidentIndex
impl Unpin for ResidentIndex
impl UnsafeUnpin for ResidentIndex
impl UnwindSafe for ResidentIndex
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more