From: | Alexander Rüegg <arueegg(at)uni-bielefeld(dot)de> |
---|---|
To: | pgsql-general(at)postgresql(dot)org |
Cc: | teodor(at)sigaev(dot)ru, oleg(at)sai(dot)msu(dot)su |
Subject: | Tsearch2 lexeme position |
Date: | 2003-08-13 09:15:20 |
Message-ID: | 3F3A01A8.1030006@uni-bielefeld.de |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Hi,
Is it possible to get all the positions of a lexeme in a result-set of a
query? For example, we have the table
TEXT TEXT_IDX
'TSearch2 is very cool' ...
'It would be much cooler with lexeme positions'
Our query is
SELECT text, position FROM thetable WHERE text_idx @@ 'cool'::tsquery;
^^^^^^^^
The result should be something like:
'TSearch2 is very cool', 4
'It would be much cooler with lexeme positions', 5
If not, is there a function that returns the positions of a lexeme in a
single entry?
thanks
Alex
--
Dipl.-Inform. Alexander Rueegg
Bioinformatics Department Faculty of Technology
Bielefeld University
Phone: +49 (0)521-106-3541
Fax: +49 (0)521-106-6488
Room: C02-206
Email: arueegg(at)techfak(dot)uni-bielefeld(dot)de
From | Date | Subject | |
---|---|---|---|
Next Message | Alexander | 2003-08-13 09:18:53 | Re: TSearch2 |
Previous Message | Dennis Björklund | 2003-08-13 09:00:20 | Re: Sorting Problem |