pub struct Fts5TextSearch { /* private fields */ }Expand description
A TextSearch backed by SQLite FTS5 virtual tables.
Each instance manages one table: fts_{table_key}. Documents are stored
with their metadata in UNINDEXED columns; only title and body are
full-text indexed.
Trait Implementations§
Source§impl TextSearch for Fts5TextSearch
impl TextSearch for Fts5TextSearch
Source§fn upsert_document<'life0, 'async_trait>(
&'life0 self,
document: TextDocument,
) -> Pin<Box<dyn Future<Output = Result<(), StorageError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn upsert_document<'life0, 'async_trait>(
&'life0 self,
document: TextDocument,
) -> Pin<Box<dyn Future<Output = Result<(), StorageError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Index or update a single text document.
Source§fn upsert_documents<'life0, 'async_trait>(
&'life0 self,
documents: Vec<TextDocument>,
) -> Pin<Box<dyn Future<Output = Result<BatchWriteSummary, StorageError>> + 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 = Result<BatchWriteSummary, StorageError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Index or update a batch of text documents.
Source§fn delete_document<'life0, 'life1, 'async_trait>(
&'life0 self,
namespace: &'life1 str,
subject_id: Uuid,
) -> Pin<Box<dyn Future<Output = Result<bool, StorageError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn delete_document<'life0, 'life1, 'async_trait>(
&'life0 self,
namespace: &'life1 str,
subject_id: Uuid,
) -> Pin<Box<dyn Future<Output = Result<bool, StorageError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Remove a document from the text index.
Source§fn get_document<'life0, 'life1, 'async_trait>(
&'life0 self,
namespace: &'life1 str,
subject_id: Uuid,
) -> Pin<Box<dyn Future<Output = Result<Option<TextDocument>, StorageError>> + 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 = Result<Option<TextDocument>, StorageError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Fetch an indexed document by namespace and subject ID.
Source§fn search<'life0, 'async_trait>(
&'life0 self,
request: TextSearchRequest,
) -> Pin<Box<dyn Future<Output = Result<Vec<TextSearchHit>, StorageError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn search<'life0, 'async_trait>(
&'life0 self,
request: TextSearchRequest,
) -> Pin<Box<dyn Future<Output = Result<Vec<TextSearchHit>, StorageError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Run a full-text search query and return ranked hits.
Source§fn count<'life0, 'async_trait>(
&'life0 self,
filter: TextFilter,
) -> Pin<Box<dyn Future<Output = Result<u64, StorageError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn count<'life0, 'async_trait>(
&'life0 self,
filter: TextFilter,
) -> Pin<Box<dyn Future<Output = Result<u64, StorageError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Count documents matching a filter.
Source§fn stats<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<TextIndexStats, StorageError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn stats<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<TextIndexStats, StorageError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Return index metadata and health statistics.
Source§fn search_with_options<'life0, 'async_trait>(
&'life0 self,
request: TextSearchRequest,
options: TextSearchOptions,
) -> Pin<Box<dyn Future<Output = Result<Vec<TextSearchHit>, StorageError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn search_with_options<'life0, 'async_trait>(
&'life0 self,
request: TextSearchRequest,
options: TextSearchOptions,
) -> Pin<Box<dyn Future<Output = Result<Vec<TextSearchHit>, StorageError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Search with explicit gather options (candidate-gather optimization). Read more
Source§fn term_stats<'life0, 'async_trait>(
&'life0 self,
request: TextTermStatsRequest,
) -> Pin<Box<dyn Future<Output = Result<Vec<TextTermStats>, StorageError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn term_stats<'life0, 'async_trait>(
&'life0 self,
request: TextTermStatsRequest,
) -> Pin<Box<dyn Future<Output = Result<Vec<TextTermStats>, StorageError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Return per-term document frequency and IDF for a set of query terms. Read more
Source§fn rebuild<'life0, 'async_trait>(
&'life0 self,
_scope: IndexRebuildScope,
) -> Pin<Box<dyn Future<Output = Result<TextIndexStats, StorageError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn rebuild<'life0, 'async_trait>(
&'life0 self,
_scope: IndexRebuildScope,
) -> Pin<Box<dyn Future<Output = Result<TextIndexStats, StorageError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Rebuild the text index, optionally scoped to a subset of entries.
Auto Trait Implementations§
impl !RefUnwindSafe for Fts5TextSearch
impl !UnwindSafe for Fts5TextSearch
impl Freeze for Fts5TextSearch
impl Send for Fts5TextSearch
impl Sync for Fts5TextSearch
impl Unpin for Fts5TextSearch
impl UnsafeUnpin for Fts5TextSearch
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