pub struct SearchEngine { /* private fields */ }Implementations§
Source§impl SearchEngine
impl SearchEngine
pub fn new<P: AsRef<Path>>(index_path: P) -> Result<Self>
pub fn with_config<P: AsRef<Path>>( index_path: P, config: SearchConfig, ) -> Result<Self>
pub fn builder() -> SearchEngineBuilder
pub fn index_directory<P: AsRef<Path>>( &self, root: P, progress_callback: Option<ProgressCallback>, ) -> Result<usize>
pub fn update_index<P: AsRef<Path>>( &self, root: P, progress_callback: Option<ProgressCallback>, ) -> Result<UpdateStats>
pub fn search(&self, query_str: &str) -> Result<Vec<SearchResult>>
pub fn search_with_query(&self, query: &Query) -> Result<Vec<SearchResult>>
pub fn start_watching<P: AsRef<Path>>(&mut self, root: P) -> Result<()>
pub fn stop_watching(&mut self) -> Result<()>
pub fn is_watching(&self) -> bool
pub fn get_stats(&self) -> Result<IndexStats>
pub fn clear_index(&self) -> Result<()>
pub fn vacuum(&self) -> Result<()>
pub fn verify_index<P: AsRef<Path>>(&self, root: P) -> Result<VerificationStats>
pub fn add_exclusion_pattern(&self, pattern: String) -> Result<()>
pub fn get_config(&self) -> &SearchConfig
pub fn cache_stats(&self) -> (usize, bool)
Auto Trait Implementations§
impl Freeze for SearchEngine
impl !RefUnwindSafe for SearchEngine
impl Send for SearchEngine
impl Sync for SearchEngine
impl Unpin for SearchEngine
impl !UnwindSafe for SearchEngine
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