pub struct KeywordSearchEngine { /* private fields */ }Expand description
KeywordSearchEngine with BM25 ranking
Features:
- Full-text search using Tantivy (Rust Lucene alternative)
- BM25 ranking for relevance scoring
- Query parser for complex queries (AND, OR, NOT, phrases, wildcards)
- Incremental index updates
- Multi-tenant support
Implementations§
Source§impl KeywordSearchEngine
impl KeywordSearchEngine
pub fn with_config(config: KeywordSearchEngineConfig) -> Result<Self>
Sourcepub fn config(&self) -> &KeywordSearchEngineConfig
pub fn config(&self) -> &KeywordSearchEngineConfig
Get the engine configuration
pub fn index_event( &self, _event_id: Uuid, _tenant_id: &str, _event_type: &str, _entity_id: Option<&str>, _payload: &Value, ) -> Result<()>
pub fn commit(&self) -> Result<()>
pub fn search_keywords( &self, _query: &KeywordQuery, ) -> Result<Vec<KeywordSearchResult>>
pub fn delete_event(&self, _event_id: Uuid) -> Result<()>
pub fn delete_by_tenant(&self, _tenant_id: &str) -> Result<usize>
Sourcepub fn health_check(&self) -> Result<()>
pub fn health_check(&self) -> Result<()>
Health check
Auto Trait Implementations§
impl Freeze for KeywordSearchEngine
impl !RefUnwindSafe for KeywordSearchEngine
impl Send for KeywordSearchEngine
impl Sync for KeywordSearchEngine
impl Unpin for KeywordSearchEngine
impl UnsafeUnpin for KeywordSearchEngine
impl !UnwindSafe for KeywordSearchEngine
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more