Hi,

Current mysql version: 
mysql  Ver 10.11 Distrib 3.23.24-beta, for pc-linux-gnu (i686)

I realize it's old, but got length mismatch on t/merge for 3.23.39 --
still checking on it.

I used the fulltext example from the manual: manual_Fulltext_Search.html

Then I tried something like this:

-----------
SELECT id, body, MATCH (title,body) AGAINST ('Security implications of
running MySQL as root') AS score  FROM articles WHERE MATCH (title,body)
AGAINST ('Security implications of running MySQL as root') ORDER BY
score;
Empty set (0.00 sec)
-----------

Is this correct? changed/fixed? Without an explicity ORDER BY, what is
the default order?

Thanks,

-Jay J

p.s. Any chance of patching 3.23.xx with FULLTEXT stuff before 4.0? :-)

-----------------------------------------------------------------------

mysql> CREATE TABLE articles (
    ->    id INT UNSIGNED AUTO_INCREMENT NOT NULL PRIMARY KEY, 
    ->    title VARCHAR(200),
    ->    body TEXT,
    ->    FULLTEXT (title,body)
    -> );
Query OK, 0 rows affected (0.06 sec)

mysql> 
mysql> INSERT INTO articles VALUES
    ->  (0,'MySQL Tutorial', 'DBMS stands for DataBase Management ...'),
    ->  (0,'How To Use MySQL Efficiently', 'After you went through a
...'),
    ->  (0,'Optimizing MySQL','In this tutorial we will show how to
...'),
    ->  (0,'1001 MySQL Trick','1. Never run mysqld as root. 2. Normalize
...'),
    ->  (0,'MySQL vs. YourSQL', 'In the following database comparison we
...'),
    ->  (0,'MySQL Security', 'When configured properly, MySQL could be
...');
Query OK, 6 rows affected (0.02 sec)
Records: 6  Duplicates: 0  Warnings: 0

mysql> SELECT * FROM articles WHERE MATCH (title,body) AGAINST
('database');
+----+-------------------+---------------------------------------------+
| id | title             | body                                        |
+----+-------------------+---------------------------------------------+
|  5 | MySQL vs. YourSQL | In the following database comparison we ... |
|  1 | MySQL Tutorial    | DBMS stands for DataBase Management ...     |
+----+-------------------+---------------------------------------------+
2 rows in set (0.00 sec)

mysql> SELECT id,MATCH (title,body) AGAINST ('Tutorial') FROM articles;
+----+-----------------------------------------+
| id | MATCH (title,body) AGAINST ('Tutorial') |
+----+-----------------------------------------+
|  1 |                        0.64840710366884 |
|  2 |                                       0 |
|  3 |                        0.97261067616066 |
|  4 |                                       0 |
|  5 |                                       0 |
|  6 |                                       0 |
+----+-----------------------------------------+
6 rows in set (0.01 sec)

mysql> SELECT id, body, MATCH (title,body) AGAINST ('Security
implications of running MySQL as root') AS score  FROM articles WHERE
MATCH (title,body) AGAINST 
('Security implications of running MySQL as root');
+----+-----------------------------------------------+-----------------+
| id | body                                          | score           |
+----+-----------------------------------------------+-----------------+
|  6 | When configured properly, MySQL could be ...  | 1.9247910136239 |
|  4 | 1. Never run mysqld as root. 2. Normalize ... | 1.7377858876843 |
+----+-----------------------------------------------+-----------------+
2 rows in set (0.02 sec)

mysql> SELECT id, body, MATCH (title,body) AGAINST ('Security
implications of running MySQL as root') AS score  FROM articles WHERE
MATCH (title,body) AGAINST 
('Security implications of running MySQL as root') ORDER BY score;
Empty set (0.00 sec)

mysql> 

---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to