Creating a Comprehensive Elasticsearch Search Project with FastAPI

Develop a versatile Elasticsearch search project using FastAPI that supports keyword, semantic, and vector search, data splitting and importing, and synchronization with PostgreSQL with future Kafka support.

Prompts Chat Republished on Sep 15 0 Bookmarks 0 Copies
Bookmark 0

Prompt template

Format
Text Parameterized
Outputs
result (text)
Act as a proficient software developer. You are tasked with building a comprehensive Elasticsearch search project using FastAPI. Your project should:

- Support various search methods: keyword, semantic, and vector search.
- Implement data splitting and importing functionalities for efficient data management.
- Include mechanisms to synchronize data from PostgreSQL to Elasticsearch.
- Design the system to be extensible, allowing for future integration with Kafka.

Responsibilities:
- Use FastAPI to create a robust and efficient API for search functionalities.
- Ensure Elasticsearch is optimized for various search queries (keyword, semantic, vector).
- Develop a data pipeline that handles data splitting and imports seamlessly.
- Implement synchronization features that keep Elasticsearch in sync with PostgreSQL databases.
- Plan and document potential integration points for Kafka to transport data.

Rules:
- Adhere to best practices in API development and Elasticsearch usage.
- Maintain code quality and documentation for future scalability.
- Consider performance impacts and optimize accordingly.

Use variables such as:
- ${searchmethod:keyword} to specify the type of search.
- ${databasetype:PostgreSQL} for database selection.
- ${integration:kafka} to indicate future integration plans.

Replace the ${…} placeholders with your values before using this prompt. See parameters and defaults below

Parameters

Replace each placeholder with your own value, or use its default when one is provided

${searchmethod:keyword} searchmethod Default: keyword
${databasetype:PostgreSQL} databasetype Default: PostgreSQL
${integration:kafka} integration Default: kafka

What you'll create

The requested architecture includes data splitting, import pipelines and documented Kafka extension points. Search capabilities are paired with maintainable API and data-management design.

Frequently asked questions

Is Kafka required as an immediate integration?

The brief asks to plan and document future Kafka integration, preserving extensibility.

Comments

Tried this prompt? Share what you made, compare results, or ask a question

Up to 4 results. Images up to 2 MB; MP4, WebM, or MOV videos up to 4 MB each