Search in Chinese locale
added in v3
Nicolas Giard
added in v3
Lesca
Please add PostgreSQL dictionary - Chinese to the list.
Currently the search only takes the whole sentence or phases separated by punctuation marks, but not word by word.
As a global project, hopefully this can be improved.
Nicolas Giard
Lesca: Dictionaries are provided by PostgreSQL, not Wiki.js.
Lesca
Nicolas Giard: Hello Nicolas, you are right. I added a Chinese word Seperator extension "jieba" to postgres image:
And set the default_text_search to jieba:
shared_preload_libraries = 'pg_jieba.so' # (change requires restart)
# default_text_search_config='pg_catalog.simple'; default value
default_text_search_config='jiebacfg'; uncomment to make 'jiebacfg' as default
But the search doesn't work, as the option in "Wiki2" is "simple" and may override the "jieba" option in config. I tried basic as well, no luck.
Any ideas to let "wiki2" use the custom extension?
Regards,
Lesca Fang
Nicolas Giard
Lesca: You can set your custom dictionnary directly in the DB by editing the "searchEngines" table and change the config column for the row with key "postgres". Then restart your wiki to apply the changes.
Lesca
Nicolas Giard: Thanks Nicolas. I changed the
postgres
to {"dictLanguage":"jiebacfg"}
. Now everything works like a charm. Hopefully it can be configured in web UI in future.