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 !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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more