Re: Fulltext index - Mailing list pgsql-general

From Oleg Bartunov
Subject Re: Fulltext index
Date
Msg-id Pine.LNX.4.64.0811082003481.15810@sn.sai.msu.ru
Whole thread Raw
In response to Fulltext index  (Andreas Kraftl <andreas.kraftl@kraftl.at>)
List 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@sai.msu.su, http://www.sai.msu.su/~megera/
phone: +007(495)939-16-83, +007(495)939-23-83

pgsql-general by date:

Previous
From: Martin Gainty
Date:
Subject: Re: grant privileges
Next
From: Tom Lane
Date:
Subject: Re: Fulltext index