pub trait SearchEngine {
// Required methods
fn add_document(&mut self, id: &str, fields: &[(&str, &str, f64)]);
fn search(&self, query: &str, limit: usize) -> Vec<SearchResult>;
}Expand description
Trait for search backends. Implemented by BM25Index (in-memory fallback)
and can be implemented by FTS5-backed stores when the db feature is enabled.
Required Methods§
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".