Jump to content

Recommended Posts

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. 

Link to comment
https://forums.phpfreaks.com/topic/225032-php-full-text-search/
Share on other sites

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.

"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

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.