pub struct ContentSearchManager { /* private fields */ }
Expand description
High-level content search manager
Implementations§
Source§impl ContentSearchManager
impl ContentSearchManager
Sourcepub fn with_graph_store(graph_store: Arc<GraphStore>) -> Self
pub fn with_graph_store(graph_store: Arc<GraphStore>) -> Self
Create with graph store integration
Sourcepub fn index_source_file_with_tree(
&self,
file_path: &Path,
content: &str,
tree: &Tree,
language: Language,
ast_nodes: &[NodeId],
) -> Result<()>
pub fn index_source_file_with_tree( &self, file_path: &Path, content: &str, tree: &Tree, language: Language, ast_nodes: &[NodeId], ) -> Result<()>
Index a source code file with comments
Sourcepub fn remove_file(&self, file_path: &Path) -> Result<()>
pub fn remove_file(&self, file_path: &Path) -> Result<()>
Remove a file from the index
Sourcepub fn search(&self, query: &SearchQuery) -> Result<Vec<SearchResult>>
pub fn search(&self, query: &SearchQuery) -> Result<Vec<SearchResult>>
Search for content
Sourcepub fn simple_search(
&self,
query: &str,
max_results: Option<usize>,
) -> Result<Vec<SearchResult>>
pub fn simple_search( &self, query: &str, max_results: Option<usize>, ) -> Result<Vec<SearchResult>>
Search with simple text query
Sourcepub fn search_documentation(
&self,
query: &str,
max_results: Option<usize>,
) -> Result<Vec<SearchResult>>
pub fn search_documentation( &self, query: &str, max_results: Option<usize>, ) -> Result<Vec<SearchResult>>
Search only in documentation
Sourcepub fn search_comments(
&self,
query: &str,
language: Option<Language>,
max_results: Option<usize>,
) -> Result<Vec<SearchResult>>
pub fn search_comments( &self, query: &str, language: Option<Language>, max_results: Option<usize>, ) -> Result<Vec<SearchResult>>
Search only in comments
Sourcepub fn search_configuration(
&self,
query: &str,
max_results: Option<usize>,
) -> Result<Vec<SearchResult>>
pub fn search_configuration( &self, query: &str, max_results: Option<usize>, ) -> Result<Vec<SearchResult>>
Search only in configuration files
Sourcepub fn get_stats(&self) -> ContentStats
pub fn get_stats(&self) -> ContentStats
Get content statistics
Sourcepub fn get_node(&self, file_path: &Path) -> Option<ContentNode>
pub fn get_node(&self, file_path: &Path) -> Option<ContentNode>
Get a specific content node
Sourcepub fn add_update_listener(&self, listener: Box<dyn ContentUpdateListener>)
pub fn add_update_listener(&self, listener: Box<dyn ContentUpdateListener>)
Add an update listener
Sourcepub fn regex_search(
&self,
pattern: &str,
max_results: Option<usize>,
) -> Result<Vec<SearchResult>>
pub fn regex_search( &self, pattern: &str, max_results: Option<usize>, ) -> Result<Vec<SearchResult>>
Search with regex pattern
Sourcepub fn search_in_files(
&self,
query: &str,
file_patterns: Vec<String>,
max_results: Option<usize>,
) -> Result<Vec<SearchResult>>
pub fn search_in_files( &self, query: &str, file_patterns: Vec<String>, max_results: Option<usize>, ) -> Result<Vec<SearchResult>>
Search within specific file types
Sourcepub fn supported_comment_languages(&self) -> Vec<Language>
pub fn supported_comment_languages(&self) -> Vec<Language>
Get supported languages for comment extraction
Sourcepub fn supports_comment_extraction(&self, language: Language) -> bool
pub fn supports_comment_extraction(&self, language: Language) -> bool
Check if a language is supported for comment extraction
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ContentSearchManager
impl !RefUnwindSafe for ContentSearchManager
impl Send for ContentSearchManager
impl Sync for ContentSearchManager
impl Unpin for ContentSearchManager
impl !UnwindSafe for ContentSearchManager
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