问题
I am trying to match a table with keywords against a text. Problem is, that the query does not return exact matches, but only the most relevant ones:
SELECT name, name_safe, MATCH name AGAINST ('".$ad['text']."') as importance
FROM $T2
WHERE MATCH name AGAINST ('".$ad['text']."') AND cat_type = 4
ORDER BY importance DESC
LIMIT 1
$T2 contains keywords like
hunde welpen
chihuahua
I only want the query to return a hit if it is an exact match. So a search for "welpen" should not return a result.
Thank you for any help.
来源:https://stackoverflow.com/questions/25219868/limiting-full-text-mysql-searches-to-exact-matches