Re: Full text search ts_heading strange result

From: Craig Ringer <ringerc(at)ringerc(dot)id(dot)au>
To: Johann Spies <jspies(at)sun(dot)ac(dot)za>, pgsql-general(at)postgresql(dot)org
Subject: Re: Full text search ts_heading strange result
Date: 2012-07-26 08:19:02
Message-ID: 5010FD76.30308@ringerc.id.au
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On 07/26/2012 02:14 PM, Johann Spies wrote:
> Hallo Tom,
>
>> I believe the problem is that the one-argument form of to_tsquery() uses
>> the default TS configuration, which you have probably not got set to
>> "simple". For me, the default TS configuration is "english", which will
>> stem "polity" as "politi":
>>
>> regression=# select to_tsquery('(polity & church)');
>> to_tsquery
>> ---------------------
>> 'politi' & 'church'
>> (1 row)
>>
>> However the "simple" configuration doesn't do anything to that lexeme:
> Thanks for the explanation. I am working with a multi-language database
> and that was the reason for using the 'simple' configuration.
>
> I have asked, in an earlier message on this list, advice on how to
> handle full text searches in a multi-language database, but got no
> reaction to it. If there is a better way than using the 'simple'
> configuration in this case, I would gladly try it.
You'll need to store language information alongside each text value if
you want to do anything more sophisticated. If you have mixed languages
within a single text value or if you don't store information about the
language a text value is in then you're largely out of luck.

--
Craig Ringer

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Marc Mamin 2012-07-26 08:27:04 Re: Smaller data types use same disk space
Previous Message Johann Spies 2012-07-26 06:14:29 Re: Full text search ts_heading strange result