Home > Archive > MySQL Server Forum > March 2005 > full-text score returning 0









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author full-text score returning 0
Ray Gurganus

2005-03-30, 9:40 am

I'm using mysql 4.1.7 on one machine and 4.1.9 on another, and on both I'm
having trouble returning a score on a full-text index. The following
returns 26 records and all scores of 0:

SELECT article.title, article.article_id,
MATCH (body,subtitle,summa
ry,title)
AGAINST ('church') AS score
FROM article
WHERE MATCH (body,subtitle,summa
ry,title)
AGAINST ('church' IN BOOLEAN MODE)

and

SELECT article.title, article.article_id,
MATCH (body,subtitle,summa
ry,title)
AGAINST ('churches') AS score
FROM article
WHERE MATCH (body,subtitle,summa
ry,title)
AGAINST ('churches' IN BOOLEAN MODE)

returns 9 records and actual scores. The word "church" is found in many
titles and bodies, and so it should have scores?


rgurganus@citidc.com

2005-03-30, 7:03 pm

With some general web searching, I might have found an answer. Someone
suggested that if a search word is found in more than 50% of the
records of the table, then the word is thrown out as a factor in the
weighting, and this seems consistent with all of the cases that I have
tested with my setup. To confirm it, I adjusted the number of records
in my table - with exactly 50% being returned, all zero's. With the
results having one record short of 50%, I get no zero's.

So my questions - is this correct? Is this explained in the
documentation? If it is, it needs to be more easily findable, as I
couldn't find it.

I can understand the reasoning, but it still seems that some records
would still have higher weights than others - like if the word is
mentioned 10 times vs. 1 time... so I'm not sure that completely
throwing out the word is the best option?

Sponsored Links





Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive | Programming forum archive

Copyright 2009 droptable.com