pub struct MultiVectorIndexer { /* private fields */ }Expand description
Indexes a parent doc under N text representations.
Implementations§
Source§impl MultiVectorIndexer
impl MultiVectorIndexer
Sourcepub fn new(
chunks: Arc<RwLock<dyn VectorStore>>,
parents: Arc<dyn Docstore>,
) -> Self
pub fn new( chunks: Arc<RwLock<dyn VectorStore>>, parents: Arc<dyn Docstore>, ) -> Self
Build with a chunk vector store + a parent docstore.
Sourcepub fn with_parent_id_key(self, k: impl Into<String>) -> Self
pub fn with_parent_id_key(self, k: impl Into<String>) -> Self
Override the metadata key used to wire chunks back to their parent.
Sourcepub async fn index(
&self,
parent_id: impl Into<String>,
parent: Document,
representations: Vec<String>,
) -> Result<()>
pub async fn index( &self, parent_id: impl Into<String>, parent: Document, representations: Vec<String>, ) -> Result<()>
Index one parent under multiple text representations.
Each representation gets its own row in the chunk vector store
(carrying the parent_id metadata); the parent doc itself gets
stored in the docstore under parent_id.
Auto Trait Implementations§
impl Freeze for MultiVectorIndexer
impl !RefUnwindSafe for MultiVectorIndexer
impl Send for MultiVectorIndexer
impl Sync for MultiVectorIndexer
impl Unpin for MultiVectorIndexer
impl UnsafeUnpin for MultiVectorIndexer
impl !UnwindSafe for MultiVectorIndexer
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