search
Performs full-text search across canonical document content using SQLite FTS5, with optional metadata filters over authors, origin software, file type, and created/modified date windows. When you omit the text query and provide only filters, search runs in metadata-only mode.
Usage
bash
unsterwerx search [OPTIONS] [QUERY]
Arguments
| Argument | Required | Description |
|---|---|---|
QUERY | No | Search query string; required only when no metadata filters are provided |
Options
| Option | Short | Type | Default | Description |
|---|---|---|---|---|
--limit | -l | integer | 20 | Maximum number of results to return |
--author | string, repeatable | Filter by canonicalized document_author | ||
--origin-software | string, repeatable | Filter by canonicalized origin_software_name | ||
--file-type | string, repeatable | Restrict results to these file types | ||
--created-from | date/datetime | Inclusive lower bound for document_created_at | ||
--created-to | date/datetime | Inclusive upper bound for document_created_at | ||
--modified-from | date/datetime | Inclusive lower bound for document_modified_at | ||
--modified-to | date/datetime | Inclusive upper bound for document_modified_at |
Examples
Basic search
bash
unsterwerx search "cybersecurity"
Search Results (20 matches)
══════════════════════════════════════════════════════════════
1. Cybersecurity and Risk Management Framework [b8e01573]
Acquisition Cybersecurity Training February 18, 2016
DOD Cybersecurity and the Risk Management Framework (RMF)
Process for the Acquisition Community...
2. DoD Program Manager's Guidebook, Cybersecurity RMF [bd51b3ed]
Department of Defense DoD Program Manager's Guidebook for
Integrating the Cybersecurity Risk Management Framework...
3. NBIS PPP Version 1.5 [afb068e7]
Cybersecurity Strategy UNCLASSIFIED National Background
Investigation System...
══════════════════════════════════════════════════════════════
Limit results
bash
unsterwerx search "policy" --limit 5
Search Results (5 matches)
══════════════════════════════════════════════════════════════
1. Homeowners Policy Packet [d3d2da43]
HOMEOWNERS POLICY PACKET IMPORTANT MESSAGES Refer to
your Declarations Page and endorsements...
2. DODI Standards [455d5bb1]
Establishing Policy in DoDIs For DoDIs that establish
policy, the section may need to be longer...
══════════════════════════════════════════════════════════════
Metadata-only search
bash
unsterwerx search \
--origin-software "Microsoft Office Word" \
--file-type docx
text
Search Results (6 matches)
══════════════════════════════════════════════════════════════
1. Acquisition-Plan.docx [570c62fd]
· origin_software_name = microsoft office word
2. PM-Guidebook.docx [8e62a1fb]
· origin_software_name = microsoft office word
══════════════════════════════════════════════════════════════
Combined text + metadata filters
bash
unsterwerx search "cybersecurity" \
--author "Department of Defense CIO" \
--created-from 2017-12-01 \
--created-to 2017-12-31
Notes
- The query uses SQLite FTS5 syntax. Simple keywords work for most searches.
- Multi-word queries are treated as a phrase. Wrap in quotes if needed.
--authorand--origin-softwareare canonicalized the same way asmetadata find, including metadata alias resolution.- Repeating metadata filters within the same family is OR logic. Different families combine with AND logic.
- Date-only bounds are expanded to the full day. Datetime inputs may use SQLite format or RFC 3339.
- When you omit
QUERY, results are ordered deterministically by filename and document ID rather than text rank. - Search is a read-only operation — it never modifies document state or triggers extraction.
- If documents are pending canonical extraction, search prints a notice to stderr. Run
unsterwerx canonicalfirst to include them in search results. - Stale metadata-bearing documents are excluded from metadata-filtered searches and reported in a notice.
- Each result shows the document title, a truncated document ID in brackets, and either a content snippet, matching metadata rows, or both.
- Use
unsterwerx reindexif search results seem stale or incomplete after canonical extraction.