Skip to main content

InvertedIndexWriter

Trait InvertedIndexWriter 

Source
pub trait InvertedIndexWriter: Send {
    // Required methods
    fn add_index<'life0, 'async_trait>(
        &'life0 mut self,
        name: String,
        null_bitmap: Bitmap,
        values: ValueStream,
        bitmap_type: BitmapType,
    ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn finish<'life0, 'async_trait>(
        &'life0 mut self,
        total_row_count: u64,
        segment_row_count: NonZeroUsize,
    ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
}
Expand description

Trait for writing inverted index data to underlying storage.

Required Methods§

Source

fn add_index<'life0, 'async_trait>( &'life0 mut self, name: String, null_bitmap: Bitmap, values: ValueStream, bitmap_type: BitmapType, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Adds entries to an index.

  • name is the index identifier.
  • null_bitmap marks positions of null entries.
  • values is a stream of values and their locations, yielded lexicographically. Errors occur if the values are out of order.
  • bitmap_type is the type of bitmap to encode.
Source

fn finish<'life0, 'async_trait>( &'life0 mut self, total_row_count: u64, segment_row_count: NonZeroUsize, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Finalizes the index writing process, ensuring all data is written. total_row_count and segment_row_count is used to fill in the metadata.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§

Source§

impl InvertedIndexWriter for MockInvertedIndexWriter

Trait for writing inverted index data to underlying storage.

Source§

impl<W: AsyncWrite + Send + Unpin> InvertedIndexWriter for InvertedIndexBlobWriter<W>