Were you aware that TSearch2 shipped with PostgreSQL? Have you already implemented it? If so, what do you like or dislike about it? What new features would you want to see? Do you have suggestions to improve existing features? How does this compare to full-text search in Oracle, SQL Server, or DB2? Let us know what you think in the DevX Open Source discussion forum.
Although PostgreSQL doesn't include full-text indexing and search capabilities by default, you can install and use the TSearch2 module that ships with PostgreSQL to index and search large amounts of text efficiently.
by Joshua D. Drake
August 10, 2004
ike many companies, over the years my company developed a home-grown billing/project system that allows our programmers to bill to a Web application. This system is quite capable; however one of the drawbacks to the system is that there's no way to search the billable entries or customer notes.
Of course, we could use simple LIKE or regex queries via SQL but that would be resource-intensive and would not provide the detailed results we would like. For example, to search for all billing entries that had a description with the words 'apache' (to protect the customer name) and 'php' we could write a query like this:
It's quick, easy and you get access to all the articles on DevX.
This registration/login is to allow you to read articles on devx.com. Already a member?
To become a member of DevX.com create your Member Profile by completing the form below. Membership is free!