Query and search
Read this if you want to get more out of search than a bare question — filtering by date or kind, drilling into results, or browsing your wiki by metadata. (For how an agent should query, see querying from an agent.)
The basic query
Section titled “The basic query”omem query "Q3 budget review"Returns ranked hits — score, kind, page-id, and a one-line summary each. The score is a rough ranking; read the summaries, don’t just trust the top hit.
Filter the search
Section titled “Filter the search”Filters combine, so you can narrow precisely:
| Flag | Example | Effect |
|---|---|---|
--limit / -n | -n 20 | More candidates (good for skimming). |
--kind | --kind mail | Only one kind. |
--source | --source local-files | Only one backend. |
--account | --account you@co.com | Only one mail/calendar account. |
--since | --since 2w_ago | Modified at/after a time. |
--format | --format json | Machine-readable output. |
omem query "contract terms" --kind mail --since 3m_ago --limit 20--since filters on the source’s modification time (the file’s mtime, the mail Date), not when OMem ingested it. It accepts Nd_ago / Nw_ago / Nm_ago / Ny_ago or an ISO date.
Drill into a result
Section titled “Drill into a result”The progressive-disclosure ladder — go as deep as the question needs:
omem page get a3f9c2bd # the curated page (L1)omem raw get a3f9c2bd --parsed # the full parsed source (L2)omem raw get a3f9c2bd # path to the original file (L3, file kind)Any 8+ character page-id prefix works.
Browse instead of search
Section titled “Browse instead of search”When you want to list rather than rank — “all mail from this account last month” — use wiki ls. It filters by metadata with no scoring:
wiki ls also takes --search <text> for a plain substring match on title/abstract (case-insensitive, no ranking) — handy when you know roughly what the title says. For fuzzy or semantic matching, use omem query.
What’s next
Section titled “What’s next”- Querying from an agent — how an agent reranks and drills.
- CLI commands — every query/page/raw flag.