pub struct CollectionCompactor { /* private fields */ }Expand description
Collection compactor for cleaning up tombstones and optimizing storage
Implementations§
Source§impl CollectionCompactor
impl CollectionCompactor
pub fn new(collection_path: &Path) -> Self
pub fn with_config(self, config: CompactionConfig) -> Self
Sourcepub fn needs_compaction(&self) -> Result<bool>
pub fn needs_compaction(&self) -> Result<bool>
Check if compaction is needed based on current state
Sourcepub fn compact(&self) -> Result<CompactionStats>
pub fn compact(&self) -> Result<CompactionStats>
Perform collection compaction
Sourcepub fn get_compaction_history(&self) -> Result<Vec<CompactionStats>>
pub fn get_compaction_history(&self) -> Result<Vec<CompactionStats>>
Get compaction history
Sourcepub fn auto_compact_if_needed(&self) -> Result<bool>
pub fn auto_compact_if_needed(&self) -> Result<bool>
Auto-compaction check - returns true if compaction was performed
Auto Trait Implementations§
impl Freeze for CollectionCompactor
impl RefUnwindSafe for CollectionCompactor
impl Send for CollectionCompactor
impl Sync for CollectionCompactor
impl Unpin for CollectionCompactor
impl UnwindSafe for CollectionCompactor
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