Re: fts, compond words?

From: Oleg Bartunov <oleg(at)sai(dot)msu(dot)su>
To: Marcus Engene <mengpg(at)engene(dot)se>
Cc: POSTGRESQL <pgsql-general(at)postgresql(dot)org>
Subject: Re: fts, compond words?
Date: 2005-12-06 02:12:12
Message-ID: Pine.GSO.4.63.0512060510240.13553@ra.sai.msu.su
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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(at)sai(dot)msu(dot)su, http://www.sai.msu.su/~megera/
phone: +007(095)939-16-83, +007(095)939-23-83

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Bruce Momjian 2005-12-06 04:59:10 Re: Reduce NUMERIC size by 2 bytes, reduce max length to 508
Previous Message John DeSoi 2005-12-06 01:03:52 Re: mirroring tables to sqlite?