
Add Search to Your App (From Basic to Good Enough)
Search feels like infrastructure but starts as an afternoon project. Match implementation depth to actual need, from database queries to semantic search.
Search has a reputation for complexity that's only partly deserved. The truth splits cleanly: basic search is genuinely easy, semantic search is genuinely harder, and most apps need far less than they imagine. Matching implementation depth to real need prevents both embarrassing gaps and over-engineered infrastructures serving twelve documents.
Start by watching what users actually seek
Before building anything, inventory what searching would mean in your app: products by name? Articles by topic? Orders by number? Customers by partial email? These imply wildly different solutions. An order lookup needs exact matching against structured fields; article discovery needs fuzziness and relevance ranking. Ten minutes defining the job description saves a week building the wrong thing. If your searchable content currently lives in ad-hoc lists, patterns from turning spreadsheets into apps get it into queryable shape first.
Connect the Claude or Codex you already pay for — the rest runs on workers that cost a fraction.
Download meshcode →Level one: database text search
The simplest respectable version queries your existing database with case-insensitive matching across relevant fields. For modest datasets this handles exact names, prefixes, and keyword fragments adequately — often indistinguishable from fancy search to users seeking known items. Ask your agent to build it with sensible field weighting and result limits, then evaluate honestly with real queries from real colleagues. You'll learn more from twenty genuine searches than from any specification debate.
Level two: proper relevance ranking
The gap users notice next isn't finding results — it's result order feeling wrong. Dedicated search engines solve this with tokenization, typo tolerance, and relevance scoring out of the box — hosted services and self-hostable open-source options both exist. Before adopting any external engine, though, check whether your database's built-in full-text capabilities suffice; many do, and staying inside your existing Postgres avoids an entire moving part forever.
Level three: meaning, not keywords
Semantic search matches intent rather than literal strings — finding refund policy when someone types "how do I get my money back." It works by comparing embedding vectors — jargon that shouldn't scare you off; the translations live in a vibe coding glossary for exactly these terms. Practical implementations range from vector columns inside your existing database through dedicated vector stores. Reach for this tier when users describe things in unpredictable vocabulary, not because it sounds impressive.
The interface matters as much as the engine
Great backends die behind bad search boxes. Show results instantly while typing for small datasets. Display what matched and why. Handle empty results helpfully — suggesting alternatives beats apologizing. Remember recent searches for repeat visitors. Each behavior costs little and compounds into search feeling professional. Conversely, perfect relevance behind a sluggish interface reads as broken regardless of algorithmic quality.
Measure whether it helped
Search generates its own analytics: zero-result queries reveal content gaps, abandoned searches reveal relevance failures, refinement rates reveal vocabulary mismatches. Logging queries costs nothing and turns future improvements from guesses into responses to evidence — even a simple admin view built with spreadsheet-to-dashboard patterns surfaces zero-result queries quickly. Apps that read these logs improve search continuously; apps that don't rebuild engines hoping for different outcomes.
The meshcode angle
Search spans schema, backend queries, frontend interface, and tuning — multi-layer changes that benefit from reviewing diffs beside generation. meshcode gives agent sessions visible panes over your repository so each layer lands deliberately. Bring your existing subscription or use metered pay-as-you-go models.
👉 Download meshcode — Mac, Windows
More from the blog
How to Write a PRD With AI (That Engineers Actually Use)
A walkthrough of turning an idea, meeting notes, or existing code into a PRD with the biz-prd skill — and the decisions no AI can make for you.
TAM, SAM, SOM With AI: Market Sizing Without a Consultant
How to triangulate a defensible market size with the biz-market-sizing skill — top-down, bottom-up, and analogous markets — plus where the estimates usually go wrong.
How to Remove AI-Sounding Writing Before You Publish
A pre-publish checklist built on two skills — copy-humanize for rhythm and cliché, copy-brand-voice for channel tone — plus the honest limits of de-AI-ing copy.