I am using Innodb’s FTS feature for searching my database and returning the results sorted by relevancy. When using Boolean mode, the search string must be connverted to a form where the individual terms must be seperated by some operators like +, ~, -, *.
If I have a search string with multiple word, how can I (using PHP perhaps) to convert the search string so I can use it with the MATCH()... .AGAINST() clause?
Search term:
stack over flow
SQL Query:
SELECT * FROM mytable WHERE
MATCH ( name, description)
AGAINST ('+*stack* +*over* +*flow*' IN BOOLEAN MODE);"
Matched results
stack over flow
haystack hover flowers
for fuzzy search i do:
or regular: