Reputation: 20503
I read the official page: http://dev.mysql.com/doc/refman/5.5/en/fulltext-search.html but it's not providing an example
I have 1 col named "mycol", and suppose user input is "keyword1 keyword2". I want to display results ordered by relevance. I tried something like this:
select id,mycol,match(mycol) against('keyword1 keyword2' in boolean mode) as relevance from mytable
It's returning all records relevance is 0. What am I doing wrong?
Upvotes: 1
Views: 85
Reputation:
try
select id,mycol,match(mycol) against('keyword1 keyword2') as relevance from mytable order by relevance desc
Upvotes: 2