Jump to content

Full Text search returns 0 results


JoeF

Recommended Posts

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

Link to comment
https://forums.phpfreaks.com/topic/69767-full-text-search-returns-0-results/
Share on other sites

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.

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.