Skip site navigation (1) Skip section navigation (2)

Re: Fix for stop words in thesaurus file

From: Bruce Momjian <bruce(at)momjian(dot)us>
To: PostgreSQL-patches <pgsql-patches(at)postgresql(dot)org>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Oleg Bartunov <oleg(at)sai(dot)msu(dot)su>, Teodor Sigaev <teodor(at)sigaev(dot)ru>
Subject: Re: Fix for stop words in thesaurus file
Date: 2007-11-10 15:40:34
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-committerspgsql-hackerspgsql-patches
Bruce Momjian wrote:
> 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.

Patch applied.  I added documentation on this API change too.

  Bruce Momjian  <bruce(at)momjian(dot)us>

  + If your life is a hard drive, Christ can be your backup. +

In response to

pgsql-hackers by date

Next:From: Jacques CaronDate: 2007-11-10 16:04:59
Subject: Re: autovacuum_freeze_max_age
Previous:From: Bruce MomjianDate: 2007-11-10 14:37:38
Subject: Re: [HACKERS] Connection Pools and DISCARD ALL

pgsql-committers by date

Next:From: Bruce MomjianDate: 2007-11-10 16:15:24
Subject: pgsql: Use strip -x on OS/X-darwin because non-"-x" causes link
Previous:From: Bruce MomjianDate: 2007-11-10 15:39:34
Subject: pgsql: Have text search thesaurus files use "?" for stop words.

pgsql-patches by date

Next:From: Tom LaneDate: 2007-11-10 18:19:31
Subject: Re: tsearch2api .. wrapper for integrated fultext
Previous:From: Bruce MomjianDate: 2007-11-10 14:37:38
Subject: Re: [HACKERS] Connection Pools and DISCARD ALL

Privacy Policy | About PostgreSQL
Copyright © 1996-2018 The PostgreSQL Global Development Group