Full Text search returning zero results

Questions about the MySQL, PostgreSQL, and most other databases, as well as using it with PHP can be asked here.

Moderator: General Moderators

Post Reply
iubo
Forum Newbie
Posts: 1
Joined: Mon Sep 17, 2007 11:03 am

Full Text search returning zero results

Post by iubo »

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 change the script.

Here's the query I'm using:

Code: Select all

$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:

Code: Select all

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

Cheers, Hope someone can help
Joe
Post Reply