Search System — how your notes & documents get searchable
Category: infra
Where it lives: Jarvis Postgres (:5433/wednesday_search) + Mac (Ollama embed, OCR, daemon)
Source: _infra/scripts/wednesday-search*.py · lib/embedder.py · lib/doc_extract.py
What it is
One hybrid search engine over everything you keep: keyword + meaning (Postgres full-text +
local AI embeddings, fused). It powers the vault-search skill (Telegram), the wsearch CLI,
and the Drive search in the dashboard. Two separate personal corpora — notes
(Obsidian) and documents (PDFs/ID/medical) — never mixed.
It keeps itself fresh (the important part)
A background job (search-refresh, every 5 minutes) reconciles the index against disk:
anything new/changed gets re-indexed, anything deleted gets removed. You never re-index by
hand — that was the thing that always rotted before. Add a note, wait ≤5 min, it’s findable.
How to add documents
Just drop files into AOL/10 - Documents/ (any subfolder). Within 5 minutes the system:
- OCRs scanned PDFs / photos (Apple Vision — runs on the Mac, private),
- pulls out dates & types (e.g. an ID’s expiry date),
- indexes + embeds them. Then you can ask “când expiră buletinul?” and get the date + the file. Zero setup — you only put the files there.
How to use it
- Telegram: “caută în notele mele despre X”, “când expiră pașaportul” → Wednesday searches the right corpus.
- Dashboard Drive: the search bar + All / Notes / Documents toggle → results with snippets (and an expiry badge on documents).
- CLI:
~/Nevermore/_infra/scripts/wsearch "query" --source notes|docs.
Notes / privacy
- Embeddings are local (Ollama) — your medical/ID text never leaves the Mac. (Swappable to Gemini later via one config flag, if you ever want; the local option is the private default.)
- The old Qdrant experiment was retired (2026-05-30) — replaced by pgvector in the Postgres you already run, so there’s one fewer service.
- Related: skill guide vault-search.