Text search using PostgreSQL
PostgreSQL comes with some nifty search features that go a long way and are often overlooked in favor of dedicated search systems.
In short:
- for simple search use cases, use the
LIKEoperator. Optionally add abtreeindex for speed improvements - for more complex queries, fuzzy, partial matching, use
trigrambased search, via thepg_trgmextension - for long texts and powerful ranking and advanced language processing features use
full text search