pub struct StoreMerger<'a, W: Write> { /* private fields */ }Expand description
Store merger - concatenates compressed blocks from multiple stores without recompression
This is much faster than rebuilding stores since it avoids:
- Decompressing blocks from source stores
- Re-serializing documents
- Re-compressing blocks at level 22
Limitations:
- All source stores must NOT use dictionaries (or use the same dictionary)
- Doc IDs are remapped sequentially
Implementations§
Source§impl<'a, W: Write> StoreMerger<'a, W>
impl<'a, W: Write> StoreMerger<'a, W>
pub fn new(writer: &'a mut W) -> Self
Sourcepub async fn append_store<F: AsyncFileRead>(
&mut self,
data_slice: &F,
blocks: &[RawStoreBlock],
) -> Result<()>
pub async fn append_store<F: AsyncFileRead>( &mut self, data_slice: &F, blocks: &[RawStoreBlock], ) -> Result<()>
Append raw compressed blocks from a store file
data_slice should be the data portion of the store (before index/footer)
blocks contains the block metadata from the source store
Auto Trait Implementations§
impl<'a, W> Freeze for StoreMerger<'a, W>
impl<'a, W> RefUnwindSafe for StoreMerger<'a, W>where
W: RefUnwindSafe,
impl<'a, W> Send for StoreMerger<'a, W>where
W: Send,
impl<'a, W> Sync for StoreMerger<'a, W>where
W: Sync,
impl<'a, W> Unpin for StoreMerger<'a, W>
impl<'a, W> !UnwindSafe for StoreMerger<'a, W>
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> 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