pub struct MultiVectorIndex { /* private fields */ }Expand description
Multi-vector index
Implementations§
Source§impl MultiVectorIndex
impl MultiVectorIndex
Sourcepub fn with_aggregation(self, aggregation: AggregationMethod) -> Self
pub fn with_aggregation(self, aggregation: AggregationMethod) -> Self
Set aggregation method
Sourcepub fn add(&mut self, doc: MultiVectorDoc) -> Result<()>
pub fn add(&mut self, doc: MultiVectorDoc) -> Result<()>
Add a document
Sourcepub fn search(
&self,
query_vectors: &[Vec<f32>],
k: usize,
) -> Result<Vec<(String, f32)>>
pub fn search( &self, query_vectors: &[Vec<f32>], k: usize, ) -> Result<Vec<(String, f32)>>
Search using multi-vector query
Sourcepub fn get(&self, doc_id: &str) -> Option<&MultiVectorDoc>
pub fn get(&self, doc_id: &str) -> Option<&MultiVectorDoc>
Get a document by ID
Sourcepub fn num_documents(&self) -> usize
pub fn num_documents(&self) -> usize
Get number of documents
Sourcepub fn num_tokens(&self) -> usize
pub fn num_tokens(&self) -> usize
Get total number of token vectors
Sourcepub fn stats(&self) -> MultiVectorStats
pub fn stats(&self) -> MultiVectorStats
Get index statistics
Auto Trait Implementations§
impl Freeze for MultiVectorIndex
impl RefUnwindSafe for MultiVectorIndex
impl Send for MultiVectorIndex
impl Sync for MultiVectorIndex
impl Unpin for MultiVectorIndex
impl UnwindSafe for MultiVectorIndex
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
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