pub struct VectorIndex { /* private fields */ }Expand description
One path holding an embedding, and the collection its vectors live in.
The collection is keyed by document id, so an answer from it is a document id and the caller never sees a second numbering.
Implementations§
Source§impl VectorIndex
impl VectorIndex
Sourcepub fn len(&self) -> usize
pub fn len(&self) -> usize
How many documents have a vector filed.
A document with nothing at the path is not in here, so the difference between this and the collection’s length is how many documents the index does not cover.
Sourcepub fn memory_bytes(&self) -> usize
pub fn memory_bytes(&self) -> usize
What the index costs.
Sourcepub fn collection(&self) -> &Collection
pub fn collection(&self) -> &Collection
The collection underneath, for a caller that wants the vector API rather than the document one.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for VectorIndex
impl RefUnwindSafe for VectorIndex
impl Send for VectorIndex
impl Sync for VectorIndex
impl Unpin for VectorIndex
impl UnsafeUnpin for VectorIndex
impl UnwindSafe for VectorIndex
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