Full text search question (select...match...against).
Started by Alberto Otero Garcíaover 25 years ago1 messagesgeneral
Hello everybody,
We are trying to migrate an application from MySQL to PostgreSQL, and all
works fine except for a text based search we must do.
In MySQL we can run the next SQL sentence:
SELECT *, MATCH a,b AGAINST ('sample text') as x FROM t;
and it returns the a and b columns and a x column with a number that means
how much the text of the a and b columns meets the 'sample text' text.
Example (taken from the MySQL 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 |
+------------------------------+-------------------------------+--------+
Does anyone know how to do this in PostgreSQL?
Thank you in advance for your answer.
--
Alberto Otero Garc�a e-mail: alberto@cometatech.com
Cometa Technologies, S.L. URL: http://www.cometatech.com