Search Commands
Search Commands
Search across problems, solutions, critiques, findings, milestones, and events. Supports both text search and entity reference-based similarity search.
Search requires the SQLite cache at
.jj/jjj.db. Full-text search and embeddings are indexes, not stored data, so unlike the rest of jjj these commands cannot fall back to walking the markdown.jjj searchsyncs the cache itself; the--searchflags onproblem list,solution list,critique listandfinding listupdate it incrementally but need the file to exist already. If a--searchfilter reports no index, runjjj db rebuildonce.This is also why
JJJ_NO_DB=1does not affect these commands: it is a read-path measurement switch for the paths that have a fallback.For filtering rather than searching — by status, tag, author, assignee — use
jjj query, which needs no cache.
jjj search
jjj search <query> [options]The search query can be free text or an entity reference (e.g., p/01957d) for similarity search.
Options:
| Option | Type | Description |
|---|---|---|
<query> | string | Search query or entity reference for similarity search |
--type, -t | string | Filter by entity type: problem, solution, critique, milestone, event |
--text-only | flag | Force text-only search (disable semantic/embedding features) |
--json | flag | Output results as JSON |
Examples:
# Search for anything mentioning "authentication"jjj search "authentication"
# Search only problemsjjj search "login bug" --type problem
# Find entities similar to a specific problemjjj search p/01957d
# Text-only search with JSON outputjjj search "refactor" --text-only --json