Re: Fulltext index

From: Oleg Bartunov <oleg(at)sai(dot)msu(dot)su>
To: Andreas Kraftl <andreas(dot)kraftl(at)kraftl(dot)at>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Fulltext index
Date: 2008-11-08 17:14:27
Message-ID: Pine.LNX.4.64.0811082003481.15810@sn.sai.msu.ru
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Sat, 8 Nov 2008, Andreas Kraftl wrote:

> Hello again,
>
> my previous post wasn't answered. I think i told my question wrong :-).
>
> I have a table like
> a | b
> --------------------
> 'de' | Hallo welt
> 'en' | Hello world
>
> How can I create a full text index over b?

use concatenation operator: tsvector('de',b_de) || tsvector('en',b_en)

> CREATE INDEX idx ON table USING gin(
> to_tsvector(
> case
> when a = 'de' then 'german'
> when a = 'en' then 'english'
> else 'english'
> end
> ), b);
>
> This doesn't work. Error Message in german:
> FEHLER: Zugriffsmethode ЪЪginЪЪ unterstЪЪtzt keine mehrspaltigen Indexe
> SQL state: 0A000
> means, gin doesn't accept multicolumn indexes.
>
> Any ideas?
>
> Greetings Andreas
>

Regards,
Oleg
_____________________________________________________________
Oleg Bartunov, Research Scientist, Head of AstroNet (www.astronet.ru)
Sternberg Astronomical Institute, Moscow University, Russia
Internet: oleg(at)sai(dot)msu(dot)su, http://www.sai.msu.su/~megera/
phone: +007(495)939-16-83, +007(495)939-23-83

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2008-11-08 17:57:15 Re: Fulltext index
Previous Message Martin Gainty 2008-11-08 16:49:21 Re: grant privileges