pub struct MultiVectorMapping { /* private fields */ }Expand description
Mapping from internal vector IDs to document IDs and chunk indices
Implementations§
Source§impl MultiVectorMapping
impl MultiVectorMapping
Sourcepub fn insert_document(
&mut self,
doc_id: DocId,
num_chunks: usize,
) -> Vec<InternalId> ⓘ
pub fn insert_document( &mut self, doc_id: DocId, num_chunks: usize, ) -> Vec<InternalId> ⓘ
Insert a multi-vector document, returning the internal IDs
Sourcepub fn remove_document(&mut self, doc_id: &str) -> Option<Vec<InternalId>>
pub fn remove_document(&mut self, doc_id: &str) -> Option<Vec<InternalId>>
Remove a document and its vectors
Sourcepub fn get_doc(&self, internal_id: InternalId) -> Option<(&DocId, ChunkIndex)>
pub fn get_doc(&self, internal_id: InternalId) -> Option<(&DocId, ChunkIndex)>
Lookup document ID and chunk index for an internal ID
Sourcepub fn get_internal_ids(&self, doc_id: &str) -> Option<&[InternalId]>
pub fn get_internal_ids(&self, doc_id: &str) -> Option<&[InternalId]>
Get all internal IDs for a document
Sourcepub fn has_document(&self, doc_id: &str) -> bool
pub fn has_document(&self, doc_id: &str) -> bool
Check if a document exists
Sourcepub fn num_documents(&self) -> usize
pub fn num_documents(&self) -> usize
Get the number of documents
Sourcepub fn num_vectors(&self) -> usize
pub fn num_vectors(&self) -> usize
Get the total number of vectors
Trait Implementations§
Source§impl Clone for MultiVectorMapping
impl Clone for MultiVectorMapping
Source§fn clone(&self) -> MultiVectorMapping
fn clone(&self) -> MultiVectorMapping
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for MultiVectorMapping
impl Debug for MultiVectorMapping
Auto Trait Implementations§
impl Freeze for MultiVectorMapping
impl RefUnwindSafe for MultiVectorMapping
impl Send for MultiVectorMapping
impl Sync for MultiVectorMapping
impl Unpin for MultiVectorMapping
impl UnsafeUnpin for MultiVectorMapping
impl UnwindSafe for MultiVectorMapping
Blanket Implementations§
impl<T> Allocation for T
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> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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