Created
August 7, 2011 19:46
-
-
Save johnlettman-old/1130704 to your computer and use it in GitHub Desktop.
SQL Search Template
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SELECT MATCH(Content, Title) AGAINST ('%[[KEY1]]% %[[KEY2]]%') as SearchRelevance FROM [[TABLE]] WHERE MATCH(Content, Title) AGAINST('+[[KEY1]]+[[KEY2]]' IN BOOLEAN MODE) HAVING SearchRelevance > 0.1 ORDER BY SearchRelevance DESC |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment