Quick search:

SELECT search_wordidx.type AS type, search_wordidx.id AS id, count(word) * 10 * sum(ranking) AS score FROM `search_words` IGNORE INDEX (PRIMARY ) INNER JOIN search_wordidx ON search_words.id = search_wordidx.wordId WHERE (search_words.word LIKE ? OR search_words.word LIKE ? OR search_words.word LIKE ? OR search_words.word LIKE ?) GROUP BY type, id ORDER BY score DESC