小编Kar*_*lom的帖子

如何使用 Postgresql 在波斯语中使用全文搜索?

我正在使用 Postgresql 9.6,我想运行这样的查询:

\n\n
select post_id \nfrom comments \nwhere to_tsvector(\'pg_catalog.persian\', comments.body) @@ to_tsquery(\'pg_catalog.persian\', \'\xda\xa9\xd8\xaa\xd8\xa7\xd8\xa8\') ;\n
Run Code Online (Sandbox Code Playgroud)\n\n

但波斯语不在 postgresql 字典支持的语言之列:

\n\n
postgres=# \\dF\n               List of text search configurations\n   Schema   |    Name    |              Description              \n------------+------------+---------------------------------------\n pg_catalog | danish     | configuration for danish language\n pg_catalog | dutch      | configuration for dutch language\n pg_catalog | english    | configuration for english language\n pg_catalog | finnish    | configuration for finnish language\n pg_catalog | french     | configuration for french language\n pg_catalog | german     | configuration for german …
Run Code Online (Sandbox Code Playgroud)

postgresql full-text-search

5
推荐指数
1
解决办法
1716
查看次数

标签 统计

full-text-search ×1

postgresql ×1