Full-text document search service
Submitted2026-07
Private repository
An async document search service: CSV import with deduplication, paged search, and document read and delete.
Two-stage retrieval.
Elasticsearch returns up to a configured number of candidates, and PostgreSQL re-sorts them. Search engines are good at finding things and databases are good at ordering them by criteria the index does not hold; splitting the work along that seam keeps both queries simple.
An importer safe to re-run.
Deduplication on the content and its classification means a repeated import is a no-op rather than a duplication.
No configuration required to start.
Every setting has a default, so the whole stack runs without an environment file at all.
Highlights
- Async throughout: FastAPI, the Elasticsearch client, and asyncpg
- Idempotent CSV import
- A Typer CLI alongside the HTTP API
Stack
FastAPIElasticsearchPostgreSQLSQLAlchemy 2.0asyncpgTyperDocker Composepytest-asyncio