JoeF Posted September 18, 2007 Share Posted September 18, 2007 Hey, I had my full text search working previously, although recently we moved to a different server, now whenever I search I get zero results, even though there is data in the database and we haven't changed the script. Server version: 4.1.22 Here's the query I'm using: $query2="SELECT * , MATCH(`data`, `keydate`) AGAINST('$q') AS score FROM `dataindex` WHERE `userid`='$userid' AND MATCH(`data`, `keydate`) AGAINST('$q') ORDER BY score DESC "; This returns 0 results, however this: $query2="SELECT * , MATCH(`data`, `keydate`) AGAINST('$q') AS score FROM `dataindex`ORDER BY score DESC "; DOES return results, but they are not ordered correctly and aren't as relevant than what I had with the script on the old server. I have the FULL TEXT index setup in the db on the columns data and keydate. Note: NO errors are ever returned from these. Cheers, Hope someone can help Joe Quote Link to comment https://forums.phpfreaks.com/topic/69767-full-text-search-returns-0-results/ Share on other sites More sharing options...
fenway Posted September 18, 2007 Share Posted September 18, 2007 Full-text queries behave like that sometimes, especially if there are too many results. Quote Link to comment https://forums.phpfreaks.com/topic/69767-full-text-search-returns-0-results/#findComment-350530 Share on other sites More sharing options...
JoeF Posted September 18, 2007 Author Share Posted September 18, 2007 Full-text queries behave like that sometimes, especially if there are too many results. But the problem is, there is only 5 results in the database at the moment, and they are all about a paragraph each. And it worked perfectly on the other server, but now it doesn't on this server when the script hasn't been changed at all either. Quote Link to comment https://forums.phpfreaks.com/topic/69767-full-text-search-returns-0-results/#findComment-350538 Share on other sites More sharing options...
fenway Posted September 19, 2007 Share Posted September 19, 2007 Too few records also causes problems. Quote Link to comment https://forums.phpfreaks.com/topic/69767-full-text-search-returns-0-results/#findComment-351345 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.