Searching an archive can mean locating an exact command, finding an idea expressed with different words, or browsing a context you only partly remember. These tasks benefit from different techniques. A good archive supports more than one path to the material.

Exact search is fast and predictable. Lexical search can rank documents by matching terms. Semantic retrieval can help when vocabulary differs, but introduces model behavior, indexing costs, and a new class of false positives.

Start with filenames and full text

Clear titles reduce the need for sophisticated tooling. A document called postgres-backup-restoration.md is easier to recognize than db-thoughts.md. Useful headings also make search snippets interpretable.

# Literal and regex-friendly text search with context.
rg -n -i 'restore|recovery' --glob '*.md' notes/

# Find documents whose filenames contain a topic.
find notes -type f -iname '*backup*'

For a larger archive, SQLite FTS5 can provide local full-text indexing without sending documents to a hosted service. An index must be rebuilt or incrementally updated when files change; stale indexes can appear to lose information that is still present on disk.

Measure search by successful retrieval

A search system is useful if it returns the right note soon enough for the task. Make a small test set of real questions: “Which command did I use to inspect a certificate?” or “Why did I choose this file structure?” Record whether the expected note appears and whether the result is understandable without opening five other documents.

Avoid optimizing only for the number of results. Precision matters when a query returns dozens of near-duplicates; recall matters when terminology varies. A search interface should expose source files and context rather than present a decontextualized answer as certainty.

Semantic indexing belongs behind evidence

Embedding-based retrieval can be helpful for conceptual questions, but it should point to the underlying document. Keep source paths, chunk boundaries, and indexing versions. A retrieved paragraph might omit a prerequisite or caveat from the full note.

When using a local model, test quality and resource use on your own hardware. Do not assume larger models always improve practical retrieval, and do not treat a generated summary as a substitute for checking the original source.

Build retrieval into the writing habit

Write a descriptive summary near the top of important notes. Link related decisions, record alternate terminology, and keep the archive navigable without search. A future reader may remember “TLS expired” when the original note used “ACME renewal”; cross-references bridge that gap.

Notebook principle: the first retrieval improvement is usually a clearer title, not a bigger model.