~/talk

Torus: PostgreSQL Search in Ecto

Talkat Code BEAM Lite Stockholm 2025 · on Monday, 2025-06-02· [databases, elixir-and-erlang]
slides:none on file

Library Torus plugs Postgres search modes into Ecto so queries become a single Ecto line that can switch between pattern matching, trigram similarity, full‑text ranking, and semantic embedding search. It relies on Postgres features including the pgvector extension and GIN indexes, supports embedding providers (OpenAI, Hugging Face, Gemini, Postgres ML or local servers), and implements a batcher + cache pipeline to reduce API cost. Examples show fuzzy matches, prefix/full‑text ranking, and vector nearest neighbors all running inside Postgres with guidance on indexes and prefilters for speed.

AI-written summary · about

  1. 0:00Introduction
  2. 1:50What is Ecto
  3. 3:39Search types
  4. 4:08Pattern matching
  5. 6:15Similarity search
  6. 8:33Full text search
  7. 11:17Semantic search
  8. 14:47Embeddings
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.