We have a website written in Codeigniter framework. Now we want to have a nice and fast soundex based search function to the site. It's just a micro blog so we would only search in the titles of the posts.
So what would be the best for us?
I have two ideas:
Create another column in the post table with the soundex copy of the title and simply have FULL-TEXT index on it.
Explode the words from the titles and save the soundex equivalent of the words in a new table with the id of the post. Just like an automatic tag system.
Which method is the better and why? Can you suggest a better way?
Thanks for all the answers!
Soundex is great - but it usually doesn't meet user expectations for search (established by Google etc.).
The common solution to text searching, including fuzzy searches and stemming, is to use something like SOLR; it's relatively easy to integrate with PHP using web service calls.
The Zend framework has Lucene integration (never used it, but it might save you some time) - Lucene is an open source free text search platform .
May use Double Metaphone algorithm