Reputation: 1577
I am trying to run a SQL query but it ends with ERROR: text search configuration does not exist
.
How can I add a custom language text search option?
ERROR: text search configuration "czech" does not exist
LINE 88: ts_headline('czech', title, plainto_tsquery('czech', $1)...
Upvotes: 2
Views: 1647
Reputation: 140
Download this package: http://www.pgsql.cz/data/czech.tar.gz
Unzip and insert to: usr/pgsql-12/share/tsearch_data
Then run this as superuser:
CREATE TEXT SEARCH DICTIONARY cspell (template=ispell, dictfile = czech, afffile=czech, stopwords=czech);
CREATE TEXT SEARCH CONFIGURATION cs (copy=english);
ALTER TEXT SEARCH CONFIGURATION cs ALTER MAPPING FOR word, asciiword WITH cspell, simple;
Then you should be fine.
Source: https://postgres.cz/wiki/Instalace_PostgreSQL#Instalace_Fulltextu
Upvotes: 5