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?

Link to comment
Share on other sites

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.

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.