Skip to main content

TextSearch

Trait TextSearch 

Source
pub trait TextSearch:
    Send
    + Sync
    + 'static {
    // Required methods
    fn upsert_document<'life0, 'async_trait>(
        &'life0 self,
        document: TextDocument,
    ) -> Pin<Box<dyn Future<Output = StorageResult<()>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn upsert_documents<'life0, 'async_trait>(
        &'life0 self,
        documents: Vec<TextDocument>,
    ) -> Pin<Box<dyn Future<Output = StorageResult<BatchWriteSummary>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn delete_document<'life0, 'life1, 'async_trait>(
        &'life0 self,
        namespace: &'life1 str,
        subject_id: Uuid,
    ) -> Pin<Box<dyn Future<Output = StorageResult<bool>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn get_document<'life0, 'life1, 'async_trait>(
        &'life0 self,
        namespace: &'life1 str,
        subject_id: Uuid,
    ) -> Pin<Box<dyn Future<Output = StorageResult<Option<TextDocument>>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn search<'life0, 'async_trait>(
        &'life0 self,
        request: TextSearchRequest,
    ) -> Pin<Box<dyn Future<Output = StorageResult<Vec<TextSearchHit>>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn count<'life0, 'async_trait>(
        &'life0 self,
        filter: TextFilter,
    ) -> Pin<Box<dyn Future<Output = StorageResult<u64>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn stats<'life0, 'async_trait>(
        &'life0 self,
    ) -> Pin<Box<dyn Future<Output = StorageResult<TextIndexStats>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn rebuild<'life0, 'async_trait>(
        &'life0 self,
        scope: IndexRebuildScope,
    ) -> Pin<Box<dyn Future<Output = StorageResult<TextIndexStats>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
}

Required Methods§

Source

fn upsert_document<'life0, 'async_trait>( &'life0 self, document: TextDocument, ) -> Pin<Box<dyn Future<Output = StorageResult<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source

fn upsert_documents<'life0, 'async_trait>( &'life0 self, documents: Vec<TextDocument>, ) -> Pin<Box<dyn Future<Output = StorageResult<BatchWriteSummary>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source

fn delete_document<'life0, 'life1, 'async_trait>( &'life0 self, namespace: &'life1 str, subject_id: Uuid, ) -> Pin<Box<dyn Future<Output = StorageResult<bool>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source

fn get_document<'life0, 'life1, 'async_trait>( &'life0 self, namespace: &'life1 str, subject_id: Uuid, ) -> Pin<Box<dyn Future<Output = StorageResult<Option<TextDocument>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source

fn search<'life0, 'async_trait>( &'life0 self, request: TextSearchRequest, ) -> Pin<Box<dyn Future<Output = StorageResult<Vec<TextSearchHit>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source

fn count<'life0, 'async_trait>( &'life0 self, filter: TextFilter, ) -> Pin<Box<dyn Future<Output = StorageResult<u64>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source

fn stats<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = StorageResult<TextIndexStats>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source

fn rebuild<'life0, 'async_trait>( &'life0 self, scope: IndexRebuildScope, ) -> Pin<Box<dyn Future<Output = StorageResult<TextIndexStats>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Implementors§