From: | Bruce Momjian <bruce(at)momjian(dot)us> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | Oleg Bartunov <oleg(at)sai(dot)msu(dot)su>, Teodor Sigaev <teodor(at)sigaev(dot)ru>, PostgreSQL-patches <pgsql-patches(at)postgresql(dot)org> |
Subject: | Fix for stop words in thesaurus file |
Date: | 2007-11-09 02:32:09 |
Message-ID: | 200711090232.lA92W9614295@momjian.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-committers pgsql-hackers pgsql-patches |
Tom Lane wrote:
> Bruce Momjian <bruce(at)momjian(dot)us> writes:
> > Tom Lane wrote:
> >> One possible real solution would be to tweak the dictionary APIs so
> >> that the dictionaries can find out whether this is the first load during
> >> a session, or a reload, and emit notices only in the first case.
>
> > Yea, that would work too. Or just throw an error for a stop word in the
> > file and then you never get a reload (use "*" instead).
>
> Hm, that's a thought --- it'd be a way to solve the problem without an
> API change for dictionaries, which is something to avoid at this late
> stage of the 8.3 cycle. Come to think of it, does the ts_cache stuff
> work properly when an error is thrown in dictionary load (ie, is the
> cache entry left in a sane state)?
I have developed the attached patch which uses "?" to mark stop words in
the thesaurus file. ("*" was already in use in the file.) I updated
the docs to use "?", which makes the documentation clearer too.
The patch also reenables testing of stop words in the thesuarus file.
FYI, there is no longer a NOTICE for stop words in the thesaurus file;
it throws an error now, and says to use "?" instead.
--
Bruce Momjian <bruce(at)momjian(dot)us> http://momjian.us
EnterpriseDB http://postgres.enterprisedb.com
+ If your life is a hard drive, Christ can be your backup. +
Attachment | Content-Type | Size |
---|---|---|
/pgpatches/ts_thesaurus | text/x-diff | 6.5 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Simon Riggs | 2007-11-09 08:35:17 | Re: pgsql: If an index depends on no columns of its table, give it a |
Previous Message | Bruce Momjian | 2007-11-09 01:32:22 | pgsql: In tsearch code, remove !(A && B) via restructuring, for clarity |
From | Date | Subject | |
---|---|---|---|
Next Message | Bruce Momjian | 2007-11-09 02:50:45 | Re: [HACKERS] Connection Pools and DISCARD ALL |
Previous Message | Andrew Dunstan | 2007-11-09 02:30:48 | Re: How to determine if psql returns ZERO to the "shell" and finished successfully? |
From | Date | Subject | |
---|---|---|---|
Next Message | Bruce Momjian | 2007-11-09 02:50:45 | Re: [HACKERS] Connection Pools and DISCARD ALL |
Previous Message | Jan Urbański | 2007-11-09 01:22:34 | a tsearch2 (8.2.4) dictionary that only filters out stopwords |