Usage
Search terms (supports phrases, proximity, and boolean operators)
Options
Filter by collection name (can be specified multiple times). Defaults to all included collections.
Maximum number of results
Return all matches (use with
--min-score)Minimum score threshold (0-1)
Show full document instead of snippet
Add line numbers to output
Output as JSON
Output as CSV
Output as Markdown
Output as XML
Output file paths only (with docid and score)
Query Syntax
BM25 search supports: Exact phrases:Examples
Output Formats
CLI (default)
Color-coded results with snippets, scores, and context.JSON
Structured output withdocid, score, file, title, context, and snippet/body.
Files
Simple format:#docid,score,filepath,"context"
CSV
Spreadsheet-compatible with all fields.Markdown
Formatted for documentation with headings and code blocks.XML
Structured XML with<document> elements.
Score Normalization
BM25 scores are normalized to 0-1 range using sigmoid transformation:- 70%+ — Excellent match (green)
- 40-69% — Good match (yellow)
- Below 40% — Weak match (dim)
Performance
BM25 search is the fastest option:- No LLM inference required
- Direct SQLite FTS5 index query
- Typically completes in under 50ms
qmd query or qmd vsearch.
Related Commands
qmd query
Hybrid search with query expansion and reranking (recommended)
qmd vsearch
Vector semantic search
qmd get
Retrieve document by path or docid