From: | Alberto Otero García <alberto(at)cometatech(dot)com> |
---|---|
To: | pgsql-general(at)postgresql(dot)org |
Subject: | Full text search question (select...match...against). |
Date: | 2001-02-01 17:15:46 |
Message-ID: | 3A7999C2.FC296B8A@cometatech.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | 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(at)cometatech(dot)com
Cometa Technologies, S.L. URL: http://www.cometatech.com
From | Date | Subject | |
---|---|---|---|
Next Message | Michael Dunn | 2001-02-01 17:56:25 | Obtaining nTuples from a cursor |
Previous Message | Camm Maguire | 2001-02-01 15:57:18 | Cursors in SPI functions/procedures |