On Mon, 7 Jan 2002, Arne Mueller wrote:
> I wonder whether one can use the full text indexes in mysql to find out
> what words in a document are likely to be relevant key words.
>
> . . .
>
> I'd be nice to have a command like this:
>
> select keywords(10.0) from MyDocs where DocId = 666;
>
> . . .

Isn't function MATCH what you want?  Example from the manual:

mysql> SELECT *,MATCH a,b AGAINST ('collections support') as x FROM t;
+------------------------------+-------------------------------+--------+
| a                            | b                             | x      |
+------------------------------+-------------------------------+--------+
| MySQL has now support        | for full-text search          | 0.3834 |
| Full-text indexes            | are called collections        | 0.3834 |
| Only MyISAM tables           | support collections           | 0.7668 |
| Function MATCH ... AGAINST() | is used to do a search        |      0 |
| Full-text search in MySQL    | implements vector space model |      0 |
+------------------------------+-------------------------------+--------+
5 rows in set (0.00 sec)

The function MATCH matches a natural language query AGAINST a text
collection (which is simply the columns that are covered by a FULLTEXT
index). For every row in a table it returns relevance - a similarity
measure between the text in that row (in the columns that are part of the
collection) and the query.  When it is used in a WHERE clause (see example
above) the rows returned are automatically sorted with relevance
decreasing.

--
   ,
 M A R I O   data miner, LIACC, room 221   tel 351+226078830, ext 121
 A M A D O   Rua Campo Alegre, 823         fax 351+226003654
 A L V E S   P-4150-180 PORTO, Portugal    mob 351+939354002



---------------------------------------------------------------------
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