3 ms·
... or you can just use a proper full-text search package (e.g. tsearch2 for PostgreSQL), and get all that for free, with a lot more features (stemming, diction
by neilc 19y ago
... or you can just use a proper full-text search package (e.g. tsearch2 for PostgreSQL), and get all that for free, with a lot more features (stemming, dictionaries, sophisticated ranking, etc.). For non-trivial queries, it is also likely to be at least as efficient as your home-grown search package is likely to be, unless you put a lot of effort into optimizing it yourself.
But hey, rolling your own text search from scratch is fun, so don't let me stop you :)
- emmett 19y agoWe're using tsearch2 right now. It's not very flexible, and it has lots of irritating gotchas - or I'm not a competent enough sysadmin to use it properly.