I followed this example from the Mysql Documentation:
CREATE TABLE articles (
id INT UNSIGNED AUTO_INCREMENT NOT NULL PRIMARY KEY,
title VARCHAR(200),
body TEXT,
FULLTEXT (title,body)
);
INSERT INTO articles (title,body) VALUES
('MySQL Tutorial','DBMS stands for DataBase ...'),
('How To Use MySQL Well','After you went through a ...'),
('Optimizing MySQL','In this tutorial we will show ...'),
('1001 MySQL Tricks','1. Never run mysqld as root. 2. ...'),
('MySQL vs. YourSQL','In the following database comparison ...'),
('MySQL Security','When configured properly, MySQL ...');
SELECT *, MATCH ( title, body ) AGAINST ( 'database' ) AS Score
FROM articles
WHERE MATCH (title,body) AGAINST ('database');
+----+-------------------+------------------------------+------------+
| id | title | body | Score |
+----+-------------------+------------------------------+------------+
| 5 | MySQL vs. YourSQL | In the following database... | 0.662664...|
| 1 | MySQL Tutorial | DBMS stands for DataBase ... | 0.655458...|
+----+-------------------+------------------------------+------------+
this works, but if i delete all rows, but one:
DELETE FROM `articles` WHERE id >1
then the select gives Score 0:
SELECT * , MATCH ( title, body ) AGAINST ( 'database' ) AS Score FROM articles
