QueryExpander

Trait QueryExpander 

Source
pub trait QueryExpander: Send + Sync {
    // Required methods
    fn expand<'life0, 'life1, 'life2, 'async_trait>(
        &'life0 self,
        query: &'life1 str,
        context: Option<&'life2 str>,
    ) -> Pin<Box<dyn Future<Output = Result<ExpandedQuery>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait,
             'life2: 'async_trait;
    fn model_name(&self) -> &str;
}
Expand description

Query expansion trait

Required Methods§

Source

fn expand<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, query: &'life1 str, context: Option<&'life2 str>, ) -> Pin<Box<dyn Future<Output = Result<ExpandedQuery>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Expand query into variants

Source

fn model_name(&self) -> &str

Get model name

Implementors§