PDA

View Full Version : [MySQL] Fulltext Wildcards


dduardo
Jun25-04, 04:36 PM
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:

$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.

dduardo
Jun25-04, 08:31 PM
Ok, I just talked to some guys over at the mysql chatroom on freenode. They recommended writing my own search engine since fulltext is slow.

If anyone has worked with databases before can you recommend an efficient indexing algorithms.