Trait lance_index::Index
source · pub trait Index: Send + Sync {
// Required methods
fn as_any(&self) -> &dyn Any;
fn as_index(self: Arc<Self>) -> Arc<dyn Index>;
fn statistics(&self) -> Result<String>;
fn index_type(&self) -> IndexType;
fn calculate_included_frags<'life0, 'async_trait>(
&'life0 self
) -> Pin<Box<dyn Future<Output = Result<RoaringBitmap>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
}Expand description
Generic methods common across all types of secondary indices
Required Methods§
sourcefn statistics(&self) -> Result<String>
fn statistics(&self) -> Result<String>
Retrieve index statistics as a JSON string
sourcefn index_type(&self) -> IndexType
fn index_type(&self) -> IndexType
Get the type of the index
sourcefn calculate_included_frags<'life0, 'async_trait>(
&'life0 self
) -> Pin<Box<dyn Future<Output = Result<RoaringBitmap>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn calculate_included_frags<'life0, 'async_trait>(
&'life0 self
) -> Pin<Box<dyn Future<Output = Result<RoaringBitmap>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Read through the index and determine which fragment ids are covered by the index
This is a kind of slow operation. It’s better to use the fragment_bitmap. This only exists for cases where the fragment_bitmap has become corrupted or missing.