Skip to main content

search_docs

Function search_docs 

Source
pub fn search_docs(
    docs_dir: Option<&Path>,
    query: &str,
    limit: Option<usize>,
    offset: Option<usize>,
) -> Result<Value>
Expand description

Search documentation files for a query string.

Performs case-insensitive substring matching across all markdown files. Searches both filenames and file content. Results are ranked by relevance: filename matches first, then by number of content matches.

The query is split into terms (space-separated) and all terms must appear in the file (either in the filename or content) for it to be a match.

Supports pagination via limit and offset parameters.