Expand description
§srcsearch
srcsearch indexes Rust source and Markdown documentation, and supports
full-text lookup over indexed content through Tantivy.
§Typical workflow
- Build records with
index_project(orindex_targetfor incremental work). - Persist results via
write_jsonorwrite_tantivy_index. - Query with
search_tantivy_index_with_explain(passfalsefor explanations when you only need hits).
See the project README for CLI examples and end-to-end usage.
Structs§
Enums§
Functions§
- collect_
files - Collects Rust and Markdown files under a project root while honoring ignore rules.
- get_
tantivy_ doc_ field - Looks up a required Tantivy field by name and returns a contextual error if missing.
- index_
project - Indexes an entire project directory relative to itself.
- index_
target - Indexes either a single file or directory and normalizes file paths relative to
project_root. - search_
tantivy_ index - search_
tantivy_ index_ with_ explain - Executes search and optionally attaches Tantivy score explanations for the top results.
- update_
tantivy_ index - Updates an existing Tantivy index by deleting changed files and re-adding their current records.
- write_
json - Writes indexed records as pretty JSON using a temporary file for atomic replacement.
- write_
tantivy_ index - Creates a new Tantivy index directory and writes all provided records into it.