Re: tsearch2 in multilingual database?

From: Hannes Dorbath <light(at)theendofthetunnel(dot)de>
To: Joshua N Pritikin <jpritikin(at)pobox(dot)com>
Subject: Re: tsearch2 in multilingual database?
Date: 2007-07-06 06:30:03
Message-ID: 468DE16B.80805@theendofthetunnel.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On 04.07.2007 11:20, Joshua N Pritikin wrote:
> Sometime in the future, I anticipate storing other languages in addition
> to English in my database to be indexed with tsearch2. set_curcfg()
> seems to be per-session. Will I need to call set_curcfg() every time I
> switch languages?

You *should* create a TSearch config for each language, at least if
you'd like to use stemming, compound words etc. When you have a
multilingual project, I'm sure you have a `languages' table already
somewhere. Just extent that table with a tsearch_config field, so you
know what config to use for what language.. and yes, you have to set
that every time.

--
Regards,
Hannes Dorbath

In response to

Browse pgsql-general by date

  From Date Subject
Next Message PFC 2007-07-06 07:31:41 Re: Polymorphic delete help needed
Previous Message Pavan Deolasee 2007-07-06 06:00:19 Re: Problem with autovacuum and pg_autovacuum