Del*_*ium 2 postgresql full-text-search
我正在尝试运行 SQL 查询,但它以ERROR: text search configuration does not exist
.
如何添加自定义语言文本搜索选项?
ERROR: text search configuration "czech" does not exist
LINE 88: ts_headline('czech', title, plainto_tsquery('czech', $1)...
Run Code Online (Sandbox Code Playgroud)
小智 5
下载这个包:http : //www.pgsql.cz/data/czech.tar.gz
解压并插入到:usr/pgsql-12/share/tsearch_data
然后以超级用户身份运行:
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;
Run Code Online (Sandbox Code Playgroud)
那你应该没问题。
来源:https : //postgres.cz/wiki/Instalace_PostgreSQL#Instalace_Fulltextu