Jump to content

[SOLVED] Fulltext indexing and MATCH()..AGAINST()


morphboy23

Recommended Posts

I've been checking a lot of examples for utilizing fulltext indexing and how to use MATCH()...AGAINST(), and I noticed that all the relevancy scores returned in these examples are not integers, many times below 1 even. Yet my queries always return whole-number scores, like 1 2 3 etc. Nothing like the .8943246 (whatever) I've seen elsewhere. Am I doing something wrong?

Here is an example of one of my queries:

 

SELECT DISTINCT u.iduser, u.username, i.idinquiry, i.title, i.categories, i.date, i.anonymous, 
     (SELECT COUNT(*) FROM responses AS r WHERE r.idinquiry = i.idinquiry) AS counter, 
     MATCH(i.title, i.text) AGAINST('" . $q . "' IN BOOLEAN MODE) AS score 
   FROM users AS u, inquiries AS i 
   WHERE MATCH(i.title, i.text) AGAINST('" . $q . "' IN BOOLEAN MODE) AND u.iduser = i.iduser ORDER BY score DESC

 

Anyone have any ideas? I'm not sure why the score would be converted to integers, if that is even the case. Any help is appreciated.

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.