Using Full-text Search
If you've ever used Google to search for a web site (and who hasn't), you've used a full-text search engine. A full-text search engine catalogs the words and phrases found in a set of documents and then lets you search for documents that match a given pattern. The tsearch2 contributed module adds full-text search features to a PostgreSQL server. When you add the tsearch2 package to a database, you get a small collection of new data types, a large collection of new functions (most of which you'll never invoke directly), and a new search operator. When you use tsearch2, the documents that you catalog and search are the values stored in your database. If you have customers table that stores miscellaneous notes about each ...
Get PostgreSQL, Second Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.