Thread: full-text search configuration question

full-text search configuration question

From
Andrew Geery
Date:
I have several tables with text columns that contain information that
I would like to be able to search using a FTS index.  For each text
column, there is also a column that is a foreign key into a language
table for the language used in the text.  My idea is to add a column
to the language table to reference a FTS configuration for a given
language and to write a function to wrap a call to to_tsvector (after
looking up the given configuration name from the language) as per the
documentation [http://www.postgresql.org/docs/8.4/interactive/textsearch-tables.html].
 However, functions used in indexes must be immutable and while the
FTS configuration probably wouldn't change very often for a given
language, I suppose it is possible.

My question is: am I better off putting a column in each table with
which I want to use FTS to store the FTS config name or can I get away
with pushing the FTS configuration name into the language table?

Thanks
Andrew