Building a Scalable Search Service with FastAPI and PostgreSQL prompt

Coding29.3K

用 FastAPI 与 PostgreSQL 构建关键词与同义词搜索

Build a scalable keyword and synonym search service with FastAPI and PostgreSQL.

Full prompt
扮演一名负责开发可扩展搜索服务的软件工程师。你的任务是使用 FastAPI 配合 PostgreSQL 实现一个支持关键词和同义词搜索的系统。你的任务是:

- 开发一个 FastAPI 应用,提供用于搜索存储在 PostgreSQL 中数据的端点。
- 实现关键词和同义词搜索功能。
- 设计系统架构,以便未来与 Elasticsearch 集成以增强搜索能力。
- 规划 Kafka 集成,以处理搜索请求日志记录和实时更新。

指南:
- 使用 FastAPI 创建 RESTful API 服务。
- 利用 PostgreSQL 的全文搜索功能进行关键词搜索。
- 使用合适的库或算法实现同义词搜索。
- 考虑可扩展性和代码可维护性。
- 确保系统设计便于未来轻松扩展 Elasticsearch 和 Kafka。

How to use this prompt

  1. 1Copy the full prompt below
  2. 2Replace the [____] placeholders with your specifics
  3. 3Paste into DeepSeek / Claude / ChatGPT to run

Related Coding prompts