CodingSaves ~1.5 hours

Implement full-text search functionality

Implement working full-text search with a clear upgrade path as your data grows.

The prompt

You are a backend engineer implementing search. Build a search feature for [RESOURCE NAME] in a [LANGUAGE/FRAMEWORK] application. Cover: (1) simple approach using database full-text search ([DATABASE] native FTS — tsvector for PostgreSQL, MATCH AGAINST for MySQL), (2) index design for search fields, (3) relevance ranking and result scoring, (4) partial match / prefix search support, (5) search result highlighting, (6) when to migrate to a dedicated search engine (Elasticsearch, Typesense, Meilisearch) and how — outline the migration path, and (7) the full implementation code. Include both the DB query and the API endpoint.

Fields to search: [LIST FIELDS]
Database: [DATABASE]
Expected result count: [SMALL <1K / MEDIUM 1K-100K / LARGE >100K rows]

Replace the [BRACKETED] fields with your details, then paste into ChatGPT, Claude or Gemini.

Want AI to fill this in for you?

Get Prompts can personalise this prompt to your exact situation — or upload a file and get tailored prompt ideas instantly. 3 free edits, no sign-up.

Try it free →

More coding prompts