Hello,
I am having problems using MySQL's fulltext search and returning the results in order by relevance. I have to use boolean full text search, which does not return results in order by relevance. However, I need these results in order of relevance. If I attempt to add an order by clause on the end of the query, the query results to using filesort, which makes the query incredibly slow (over 1000 times slower than without). I am not sure what can be done.
Here is my query:
SELECT g.id, MATCH(g.searchable_name) AGAINST ('test*' IN BOOLEAN MODE) AS relevance
FROM games g
WHERE MATCH(g.searchable_name) AGAINST ('test*' IN BOOLEAN MODE)
ORDER BY relevance DESC
LIMIT 0, 31
Thanks in advance.