AnuWorkWriting
Available
Ask me anything

Ask anything about Anu —
his work, skills, or experience.

Ask me anything

I Assumed Users Would Search for Movie Titles. I Was Wrong.

March 2026·5 min read

The gap between how I stored data and how users searched for it is where the product was failing.

The database was structured for exact title matches, but FilmFlux users searched with intent. They typed “Mercy Johnson movies” or “2024 romantic comedy.” The SQL pattern matching returned zero results. The content existed, but the logic couldn't find it.

The fix

To fix this, I architected a hybrid search system using Supabase Edge Functions. Pure semantic search fails on specific keywords, while pure keyword search fails on context. I needed both.

Four layers

1

Semantic understanding

OpenAI embeddings to match "vibe" and plot. A query like "movie about a heist gone wrong" finds the right films even without title keywords.

2

Intent detection

Logic to parse natural language filters. Years, genres, actors, and combinations like "2024 romantic comedy" get decomposed into structured filters before search.

3

Fuzzy matching

pg_trgm to handle typos. "Merci Johson" still finds Mercy Johnson. Users don’t get punished for misspelling.

4

Recency weighting

Custom ranking to surface new hits, not obscure back-catalog titles. Recent, popular content ranks higher when relevance scores are close.

The result

A search bar that handles typos, understands context, and respects popularity. Users don't need to know the exact title. They search the way they think, and the system meets them there.

Takeaway

Don't force users to speak the database's language. Build the infrastructure to understand theirs.

SearchEmbeddingsSupabasepgvectorNLPUX