// search

Search the writing

hybrid · pgvector + tsvector · gemini/gemini-embedding-001
// how this works

Every article gets chunked by markdown section, embedded with gemini-embedding-001 at 512 dimensions, and stored in Postgres via pgvector with an HNSW index. The same chunks also carry a tsvector column for classic full-text search with English stemming.

Each query runs both rankers in parallel (one SQL roundtrip — two CTEs) and fuses the results with Reciprocal Rank Fusion:

rrf(d) = Σ over rankers r:  1 / (k + rank_r(d))

Result: semantic matches that don't share keywords still surface, but a query with exact technical terms (an API name, a CLI flag) still nails the right page.