- #1
dduardo
Staff Emeritus
- 1,905
- 3
Do you guys know if it is possible to use pre-appended wildcards when doing a fulltext search? Is there a workaround that I could possibly use? I've read through the documentation and it seems as if you can only do appended wildcards. Here is my query:
I know I can use LIKE with % on both ends of each word, but I need the ability to use boolean operators for advanced searching and have my query sorted by relevance.
Code:
$query = "SELECT title, MATCH (title) AGAINST ('" . $search . "' IN BOOLEAN MODE) AS relevance FROM descriptions WHERE MATCH (title) AGAINST ('" . $search . "*' IN BOOLEAN MODE) ORDER BY relevance DESC"
I know I can use LIKE with % on both ends of each word, but I need the ability to use boolean operators for advanced searching and have my query sorted by relevance.
Last edited: