pub struct Searcher { /* private fields */ }Implementations§
Source§impl Searcher
impl Searcher
pub fn load(project_root: &Path, model_path: &Path) -> Result<Self>
Sourcepub fn load_from_index_dir(index_dir: &Path, model_path: &Path) -> Result<Self>
pub fn load_from_index_dir(index_dir: &Path, model_path: &Path) -> Result<Self>
Load a searcher from a specific index directory (for parent index use)
Sourcepub fn filter_by_path_prefix(&self, prefix: &Path) -> Result<Vec<i64>>
pub fn filter_by_path_prefix(&self, prefix: &Path) -> Result<Vec<i64>>
Filter results to files within a subdirectory prefix. Returns document IDs where file path starts with the given prefix.
Sourcepub fn filter_by_file_patterns(&self, patterns: &[String]) -> Result<Vec<i64>>
pub fn filter_by_file_patterns(&self, patterns: &[String]) -> Result<Vec<i64>>
Get document IDs matching the given file patterns using globset
Sourcepub fn filter_by_files(&self, files: &[String]) -> Result<Vec<i64>>
pub fn filter_by_files(&self, files: &[String]) -> Result<Vec<i64>>
Get document IDs for code units in the given files (exact match)
pub fn search( &self, query: &str, top_k: usize, subset: Option<&[i64]>, ) -> Result<Vec<SearchResult>>
pub fn num_documents(&self) -> usize
Auto Trait Implementations§
impl Freeze for Searcher
impl RefUnwindSafe for Searcher
impl Send for Searcher
impl Sync for Searcher
impl Unpin for Searcher
impl UnwindSafe for Searcher
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