So I am using the following code for my boolean search...
Code:
$results = $vbulletin->db->query_first("
SELECT media
FROM " . TABLE_PREFIX . "media
WHERE MATCH (title, description) AGAINST ('".$keyword."' IN BOOLEAN MODE)
");
There are several issues I am having...
1 - searching for words 3 letters and less return no results. My researching is telling me this is because of a default setting for fulltext searching in mysql that requires a minimum of 4 characters in a search and has to be changed manually... so this is not the real issue...
2 - having trouble finding partial matches for searching. Lets say I have a media with the title "Cassandra VS Cervantes". Searching for "Cassandra" will pull this result up without any issues; however searching for "Cass" or "sandra" will not return this entry in the result. Is there any way to get boolean search to find partial matches?
--------------- Added [DATE]1280272330[/DATE] at [TIME]1280272330[/TIME] ---------------
So I went back to my old search... its not boolean, but I have another issue...
Code:
$results = $vbulletin->db->query_first("
SELECT media
FROM " . TABLE_PREFIX . "media
WHERE description LIKE '%".$keyword."%' OR title LIKE '%".$keyword."%'
");
This works fine (but no boolean), however I am having one issue. Lets say I want to search for "SSF4" and "SC4"... I can't type in "SSF4 SC4" because it will look for the exact phrase of "SSF4 SC4" instead of finding results that contain "SSF4" and/or "SC4". Is there an easy way to fix this? Or do I have to run a preg_match and seperate words by the spaces and duplicate my search terms?