I'm using MySQL FULLTEXT search (in Natural Language mode). Example:
SELECT Mem_id FROM Members WHERE MATCH (job_title) AGAINST ('".mysql_real_escape_string($keywordsWanted)."')
I noticed that searching for "web developer" or "PHP coder" didn't work too well and so I added ft_min_word_len=3
to the MySQL config file (/etc/mysql/my.cnf). However, two character search terms are still an issue. e.g. "IT contractor", "PR manager", "3D design", etc. These are some strategies I was thinking of trying:
- Use
ft_min_word_len=2
- Won't this make the index MASSIVE and slow the DB down? - Alter the query to use LIKE in cases where the keyword is less than 3 characters?
- Auto-translate common acronyms into full words. e.g. IT->"Information Technology"
- Change the UI so a Javascript popup warns the user that 2 character words aren't counted so they should rephrase the question
- Move to use Zend Lucene or another search technology
What do you advise / How have you tackled this problem?