Multilingual full text indexing - Mailing list pgsql-general

From Sukuchha
Subject Multilingual full text indexing
Date
Msg-id 1292248973746-3303131.post@n5.nabble.com
Whole thread Raw
List pgsql-general
I have a table ( named test)  with following strucuture

ID, lang, Name, Name_en, Name_de

http://postgresql.1045698.n5.nabble.com/file/n3303131/Capture.jpg

I want to do a full text seach on the table. I can create a ts_vector and
store in another column by gin_tsvector = tsvector('de', Titel_de) ||
tsvector('en' Titel_en) . But my problem is that when i  want to select and
display the column Name_en if the text is being entered in english language.
How can i select column based on the text being entered?

select id,(???????)  from test where gin_tsvector @@ to_tsquery ('english',
'Ivalo Airport')

For example, if user entered Ivalo Airport, i want to select column Name_en
and if user entered Flughafen Ivalo, i want to select column Name_de.

Any help would be highly appreciated !
--
View this message in context:
http://postgresql.1045698.n5.nabble.com/Multilingual-full-text-indexing-tp3303131p3303131.html
Sent from the PostgreSQL - general mailing list archive at Nabble.com.

pgsql-general by date:

Previous
From: Vick Khera
Date:
Subject: Re: Problem while pg_xlog directory
Next
From: "Henrique de Lima Trindade"
Date:
Subject: RES: Using regexp_replace to remove small words