Hello all
Is there any way I can use both the 'IN BOOLEAN MODE' and 'AS' score in a mysql query.
Thanks
Girish R
A MySQL question
Moderator: General Moderators
- Lord Sauron
- Forum Commoner
- Posts: 85
- Joined: Tue Apr 20, 2004 5:53 am
- Location: Tilburg, NL
Example please
Can you give an example please. What are you exactly trying to do?
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
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
- Lord Sauron
- Forum Commoner
- Posts: 85
- Joined: Tue Apr 20, 2004 5:53 am
- Location: Tilburg, NL
Copy it!
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:
So, the question is: "is your table small?"
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