Page 1 of 1
A MySQL question
Posted: Mon May 24, 2004 5:42 am
by GirishR
Hello all
Is there any way I can use both the 'IN BOOLEAN MODE' and 'AS' score in a mysql query.
Thanks
Girish R
Example please
Posted: Mon May 24, 2004 5:59 am
by Lord Sauron
Can you give an example please. What are you exactly trying to do?
Posted: Mon May 24, 2004 6:45 am
by GirishR
This is what i am trying to.
SELECT id, body, MATCH (title,body) AGAINST
('Security implications of running MySQL as root' IN BOOLEAN MODE) AS score
FROM articles WHERE MATCH (title,body) AGAINST
('Security implications of running MySQL as root' IN BOOLEAN MODE);
But the score is always 1. Why is that. Please help me.
Girish R
Copy it!
Posted: Mon May 24, 2004 8:40 am
by Lord Sauron
I noticed, that you did copy that code from an online tutorial
http://dev.mysql.com/doc/mysql/en/Fulltext_Search.html.
Try to read a little better next time. Below this query it says:
Code: Select all
Such a technique works best with large collections (in fact, it was carefully tuned this way). For very small tables, word distribution does not adequately reflect their semantic value, and this model may sometimes produce bizarre results. For example, although the word ``MySQL'' is present in every row of the articles table, a search for the word produces no results
So, the question is: "is your table small?"