drbigfresh Posted July 3, 2007 Share Posted July 3, 2007 I think I've done something wrong here, either in my query, or with the design of my table...and I can't figure out where I've made my mistake. I'm getting weird results... where words in the database aren't matched, and the score is always 0. I've attached a screen shot of the table format... Here is the query I'm executing: "SELECT id, title, description, source, pubdate, link, MATCH (title,description) AGAINST ('$SearchString') AS score FROM rnwire_news WHERE MATCH (title,description ) AGAINST ('$SearchString') ORDER BY score DESC" Any help would be greatly appreciated as I seem completely stuck on this one.... Thanks! [attachment deleted by admin] Quote Link to comment https://forums.phpfreaks.com/topic/58325-doing-something-wrong-with-full-text-searching/ Share on other sites More sharing options...
morphboy23 Posted July 5, 2007 Share Posted July 5, 2007 I'm not familiar with whatever program you are using, but do you have 'title' and 'description' set to Fulltext indexing? I didn't see any mention of that in your table image, though I might have missed it. Quote Link to comment https://forums.phpfreaks.com/topic/58325-doing-something-wrong-with-full-text-searching/#findComment-290086 Share on other sites More sharing options...
drbigfresh Posted July 5, 2007 Author Share Posted July 5, 2007 Woops...sorry. Yeah, I have : FULLTEXT KEY `Description` (`Title`,`Description`)' on the table... Quote Link to comment https://forums.phpfreaks.com/topic/58325-doing-something-wrong-with-full-text-searching/#findComment-290525 Share on other sites More sharing options...
Wildbug Posted July 5, 2007 Share Posted July 5, 2007 How many rows do you have in your table? What kinds of strings are you searching with, specifically? Quote Link to comment https://forums.phpfreaks.com/topic/58325-doing-something-wrong-with-full-text-searching/#findComment-290537 Share on other sites More sharing options...
Illusion Posted July 5, 2007 Share Posted July 5, 2007 (i) make sure that u have utf-8 character encoding (ii) ur search string is not a Full-Text Stopword. (iii) and make sure that ur variable $searchstring are interpreted , try directly passing the literal string instead of a variable if u get results look further into the code. Quote Link to comment https://forums.phpfreaks.com/topic/58325-doing-something-wrong-with-full-text-searching/#findComment-290570 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.