Previous   Next 

Installing a language dictionary (Continued)

Start a psql session.

psql ts_db

Create a new tsearch configuration, default_english.

INSERT INTO pg_ts_cfg (ts_name, prs_name, locale) VALUES ('default_english', 'default', 'en_US.UTF-8');

Insert a row into pg_ts_dict to load the english dictionary files.

INSERT INTO pg_ts_dict (
	SELECT
	'en_ispell',
	dict_init,
	'DictFile="/usr/local/pgsql/share/contrib/english.dict",
		AffFile="/usr/local/pgsql/share/contrib/english.aff",
		StopFile="/usr/local/pgsql/share/contrib/english.stop"',
	dict_lexize
	FROM pg_ts_dict
	WHERE dict_name = 'ispell_template');