Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/postgresql/10.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
向postgresql全文搜索添加新语言_Postgresql_Full Text Search_Stemming - Fatal编程技术网

向postgresql全文搜索添加新语言

向postgresql全文搜索添加新语言,postgresql,full-text-search,stemming,Postgresql,Full Text Search,Stemming,有没有办法向postgresq全文搜索添加新语言? 我可以在哪里阅读或从哪里开始?您可以从PostgreSQL文档中查看,其中列出了创建字典命令。可以使用和添加多种类型的词典,以及用于添加它们的命令 例如,如果您希望添加Ispell dictionary,您可以这样做: CREATE TEXT SEARCH DICTIONARY my_lang_ispell ( TEMPLATE = ispell, DictFile = path_to_my_lang_dict_file,

有没有办法向postgresq全文搜索添加新语言? 我可以在哪里阅读或从哪里开始?

您可以从PostgreSQL文档中查看,其中列出了创建字典命令。可以使用和添加多种类型的词典,以及用于添加它们的命令

例如,如果您希望添加Ispell dictionary,您可以这样做:

CREATE TEXT SEARCH DICTIONARY my_lang_ispell (
    TEMPLATE = ispell,
    DictFile = path_to_my_lang_dict_file,
    AffFile = path_to_my_lang_affixes_file,
    StopWords = path_to_my_lang_astop_words_file
);
DictFile和AffFile是您需要在谷歌搜索的文件,具体取决于您要添加的语言。StopWords文件保存应该忽略的单词,我想你也可以在互联网上找到该文件