Re: fts, compond words? - Mailing list pgsql-general

From Oleg Bartunov
Subject Re: fts, compond words?
Date
Msg-id Pine.GSO.4.63.0512060510240.13553@ra.sai.msu.su
Whole thread Raw
In response to Re: fts, compond words?  (Marcus Engene <mengpg@engene.se>)
Responses Re: fts, compond words?
List pgsql-general
On Mon, 5 Dec 2005, Marcus Engene wrote:

>
> I realized from the documentation that I'm not looking for
> compound words after all, I meant "exact phrase".
>
> I can't see how to make rank tell me which results has an
> exact phrase? Like "there must be a occurence of 'new' before
> 'york'"  (stemmed not really exact phrase)?

http://www.sai.msu.su/~megera/oddmuse/index.cgi/Tsearch_V2_Notes

Phrase search
     This tip is by Mike Rylander

To do phrase searching just add an additional WHERE clause to your query:

SELECT id FROM tab WHERE ts_idx_col @@ to_tsquery('history&lesson')
AND text_col ~* '.*history\\s+lesson.*';

The full-text index will still be used, and the regex will be used to
prune the results afterwards.

>
> Is there something new in rank for pg 8.1?

it has some improving, but not for your case.



     Regards,
         Oleg
_____________________________________________________________
Oleg Bartunov, sci.researcher, hostmaster of AstroNet,
Sternberg Astronomical Institute, Moscow University (Russia)
Internet: oleg@sai.msu.su, http://www.sai.msu.su/~megera/
phone: +007(095)939-16-83, +007(095)939-23-83

pgsql-general by date:

Previous
From: John DeSoi
Date:
Subject: Re: mirroring tables to sqlite?
Next
From: Tom Lane
Date:
Subject: Re: Missing variable "role" in "pg_settings"?