pub struct SearchManager<'a> { /* private fields */ }Implementations§
Source§impl<'a> SearchManager<'a>
impl<'a> SearchManager<'a>
pub fn new(pool: &'a SqlitePool) -> Self
Sourcepub async fn search(
&self,
query: &str,
include_tasks: bool,
include_events: bool,
limit: Option<i64>,
offset: Option<i64>,
sort_by_priority: bool,
) -> Result<PaginatedSearchResults>
pub async fn search( &self, query: &str, include_tasks: bool, include_events: bool, limit: Option<i64>, offset: Option<i64>, sort_by_priority: bool, ) -> Result<PaginatedSearchResults>
Unified search across tasks and events with pagination support
This is the new unified search method that replaces unified_search(). Key improvements:
- Pagination support (limit, offset)
- Flexible result inclusion (tasks, events)
- Optional priority-based secondary sorting
- Returns PaginatedSearchResults with metadata
§Parameters
query: FTS5 search query stringinclude_tasks: Whether to search in tasks (default: true)include_events: Whether to search in events (default: true)limit: Maximum number of results per source (default: 20)offset: Number of results to skip (default: 0)sort_by_priority: Enable priority-based secondary sorting (default: false)
§Returns
PaginatedSearchResults with mixed task and event results, ordered by relevance (FTS5 rank)
Auto Trait Implementations§
impl<'a> Freeze for SearchManager<'a>
impl<'a> !RefUnwindSafe for SearchManager<'a>
impl<'a> Send for SearchManager<'a>
impl<'a> Sync for SearchManager<'a>
impl<'a> Unpin for SearchManager<'a>
impl<'a> !UnwindSafe for SearchManager<'a>
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