Search Postgresql Archives

Multilingual full text indexing

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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.

-- 
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux