Full text search question (select...match...against).
| От | Alberto Otero García |
|---|---|
| Тема | Full text search question (select...match...against). |
| Дата | |
| Msg-id | 3A7999C2.FC296B8A@cometatech.com обсуждение исходный текст |
| Список | pgsql-general |
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
В списке pgsql-general по дате отправления: