ds111 Posted May 7, 2012 Share Posted May 7, 2012 Hello, I'm building a blog post website, and now I'm on the search part of it. I have a search field which I instruct the user to type in "keywords" they want to search for. The words they type in there are then to be searched in the "title" and "content" of each post in the "posts" table. Here's an example query of my current setup: SELECT * FROM (`posts`) WHERE MATCH(title,content) AGAINST('+term1* ' IN BOOLEAN MODE); This works fine if I have one or two words in they keywords. If I, however, copy and paste an entire sentence from an existing blog post, no results are found ??? Here's an example of a query where I just copy+pasted a sentence from a blog post: SELECT * FROM (`posts`) WHERE MATCH(title,content) AGAINST('+Hello* +everyone* +my* +name* +is* +Bob* ' IN BOOLEAN MODE); Yet, a search for just "Bob" returns the proper result. WHY? What's a better way to perform this search?! Link to comment Share on other sites More sharing options...
QuickOldCar Posted May 7, 2012 Share Posted May 7, 2012 Double posting, is the same question here. http://www.phpfreaks.com/forums/index.php?topic=358927.0 Link to comment Share on other sites More sharing options...
Recommended Posts