Postgres full-text search: A search engine in a database (2021)
The hardest part of building any search engine is keeping the index up-to-date with changes made to the underlying data store.It's a solvable problem, but it's always a lot of work to build and to keep working as the database schema changes in the future.This is why I really like PostgreSQL FTS: it's good enough that for many projects I don't need to use an external search engine any more - and it's way easier to keep the search index up-to-date than if the index lives in a separate system.I wrote this tutorial on implementing faceted search with PostgreSQL and Django a while ago: https://simonwillison.net/2017/Oct/5/django-postgresql-facet...