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

Link to comment
Share on other sites

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.