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.<p>It&#x27;s a solvable problem, but it&#x27;s always a lot of work to build and to keep working as the database schema changes in the future.<p>This is why I really like PostgreSQL FTS: it&#x27;s good enough that for many projects I don&#x27;t need to use an external search engine any more - and it&#x27;s way easier to keep the search index up-to-date than if the index lives in a separate system.<p>I wrote this tutorial on implementing faceted search with PostgreSQL and Django a while ago: <a href="https:&#x2F;&#x2F;simonwillison.net&#x2F;2017&#x2F;Oct&#x2F;5&#x2F;django-postgresql-faceted-search&#x2F;" rel="nofollow">https:&#x2F;&#x2F;simonwillison.net&#x2F;2017&#x2F;Oct&#x2F;5&#x2F;django-postgresql-facet...</a>