LectuLibre Scales Multilingual Book Search to 10,000+ Titles Using PostgreSQL FTS
AI-powered book translation platform LectuLibre faced severe search performance issues as its library grew to over 10,000 books across five languages. Initial SQL ILIKE queries were returning results in over 500ms and failed to handle language-specific features like stemming, stop words, and diacritics. The team evaluated external tools such as Elasticsearch and Meilisearch before opting for PostgreSQL's built-in full-text search using tsvector and tsquery types, avoiding added operational complexity. They designed a separate database table to store one tsvector per language per book, paired with a GIN index to enable fast, language-aware lookups. The approach brought query times down to a target of under 50ms while scaling on their existing Python/FastAPI and PostgreSQL stack without introducing new infrastructure.
This is an AI-generated summary. ShortSingh links to the original source for the complete article.
Discussion (0)
Log in to join the discussion and vote.
Log in