for chinese

This commit is contained in:
wenyifan 2023-09-05 23:57:13 +08:00
parent e07a02fe32
commit 1233156a64
2 changed files with 21 additions and 13 deletions

1
.gitignore vendored
View File

@ -10,6 +10,7 @@ sphinx.conf
*.p2p *.p2p
downloads.json downloads.json
node.exe node.exe
.idea
/dist /dist
/temp /temp

View File

@ -40,6 +40,9 @@ const writeSphinxConfig = async (rootPath, dbPath, params = {}) => {
min_prefix_len = 3 min_prefix_len = 3
expand_keywords = 1 expand_keywords = 1
charset_type = utf-8
charset_table = 0..9, A..Z->a..z, a..z, U+4E00..U+9FFF->U+4E00..U+9FFF, U+3400..U+4DBF->U+3400..U+4DBF, U+20000..U+2A6DF->U+20000..U+2A6DF, U+2A700..U+2B73F->U+2A700..U+2B73F, U+2B740..U+2B81F->U+2B740..U+2B81F, U+2B820..U+2CEAF->U+2B820..U+2CEAF, U+2CEB0..U+2EBEF->U+2CEB0..U+2EBEF
rt_attr_string = hash rt_attr_string = hash
rt_attr_string = name rt_attr_string = name
@ -68,6 +71,10 @@ const writeSphinxConfig = async (rootPath, dbPath, params = {}) => {
type = rt type = rt
path = ${dbPath}/database/files path = ${dbPath}/database/files
charset_type = utf-8
charset_table = 0..9, A..Z->a..z, a..z, U+4E00..U+9FFF->U+4E00..U+9FFF, U+3400..U+4DBF->U+3400..U+4DBF, U+20000..U+2A6DF->U+20000..U+2A6DF, U+2A700..U+2B73F->U+2A700..U+2B73F, U+2B740..U+2B81F->U+2B740..U+2B81F, U+2B820..U+2CEAF->U+2B820..U+2CEAF, U+2CEB0..U+2EBEF->U+2CEB0..U+2EBEF
rt_field = path rt_field = path
rt_attr_string = hash rt_attr_string = hash
rt_field = size rt_field = size