pub struct Collection { /* private fields */ }Expand description
A collection of vectors with metadata
Implementations§
Source§impl Collection
impl Collection
pub fn new(config: CollectionConfig) -> Self
pub fn name(&self) -> &str
pub fn vector_dim(&self) -> usize
pub fn distance(&self) -> Distance
pub fn count(&self) -> usize
pub fn is_empty(&self) -> bool
Sourcepub fn get_all_points(&self) -> Vec<Point>
pub fn get_all_points(&self) -> Vec<Point>
Get all points in the collection
Sourcepub fn start_batch(&self)
pub fn start_batch(&self)
Start batch insert mode
Sourcepub fn batch_upsert_with_prewarm(
&self,
points: Vec<Point>,
prewarm: bool,
) -> Result<()>
pub fn batch_upsert_with_prewarm( &self, points: Vec<Point>, prewarm: bool, ) -> Result<()>
Batch insert with optional pre-warming
Sourcepub fn prewarm_index(&self) -> Result<()>
pub fn prewarm_index(&self) -> Result<()>
Pre-warm HNSW index
Auto Trait Implementations§
impl Freeze for Collection
impl !RefUnwindSafe for Collection
impl Send for Collection
impl Sync for Collection
impl Unpin for Collection
impl !UnwindSafe for Collection
Blanket Implementations§
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more