c_pattle Posted January 20, 2011 Share Posted January 20, 2011 I'm trying to get a good full text search working but am having some problems. Below is the sql that I am using to perform the search. One of the problems I am having is that the search only seems to be working on full words. Also if I misspell a word such as "seacrh" rather than "search" then no matches are found. Is there a way to return results even for misspelt words? match(author) against('search_phrase ') Thanks for any help. Quote Link to comment https://forums.phpfreaks.com/topic/225032-php-full-text-search/ Share on other sites More sharing options...
requinix Posted January 20, 2011 Share Posted January 20, 2011 First try rebuilding the indexes. REPAIR TABLE whatever If that doesn't fix it, you might be stuck finding a more comprehensive search engine. Something on top of MySQL. We used Sphinx at my last job and that worked quite well. Quote Link to comment https://forums.phpfreaks.com/topic/225032-php-full-text-search/#findComment-1162266 Share on other sites More sharing options...
QuickOldCar Posted January 20, 2011 Share Posted January 20, 2011 "seacrh" and "search" are two different words, I should hope they didn't have a match. If needed something like similar words as you described would take enormous work, you would need to manually do word associations for every possible item someone would search for. Is multiple ways to do searches, is like,match and then can use normal index, then full_text. I personally use a mixture, but for the main searches I made full text indexes in mysql for the values looking into. I use booleon mode. http://dev.mysql.com/doc/refman/5.1/en/fulltext-boolean.html You can do full,partial,beginning,ending,exact phrases,only one word and so on. If want to find words with at least 3 letters need to change this ft_min_word_len=3 Quote Link to comment https://forums.phpfreaks.com/topic/225032-php-full-text-search/#findComment-1162270 Share on other sites More sharing options...
QuickOldCar Posted January 20, 2011 Share Posted January 20, 2011 I forgot to mention can also include or exclude using + or - before the words or characters. Quote Link to comment https://forums.phpfreaks.com/topic/225032-php-full-text-search/#findComment-1162273 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.