mirror of
https://github.com/yingziwu/mastodon.git
synced 2026-02-19 08:43:16 +00:00
convert Chinese characters from Traditional to Simplified
This commit is contained in:
parent
96b4da8b39
commit
6f6f32a532
2 changed files with 18 additions and 0 deletions
|
|
@ -16,6 +16,14 @@ class StatusesIndex < Chewy::Index
|
|||
language: 'possessive_english',
|
||||
},
|
||||
},
|
||||
char_filter: {
|
||||
tsconvert: {
|
||||
type: 'stconvert',
|
||||
keep_both: false,
|
||||
delimiter: '#',
|
||||
convert_type: 't2s',
|
||||
},
|
||||
},
|
||||
analyzer: {
|
||||
content: {
|
||||
tokenizer: 'ik_max_word',
|
||||
|
|
@ -27,6 +35,7 @@ class StatusesIndex < Chewy::Index
|
|||
english_stop
|
||||
english_stemmer
|
||||
),
|
||||
char_filter: %w(tsconvert),
|
||||
},
|
||||
},
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2,10 +2,19 @@
|
|||
|
||||
class TagsIndex < Chewy::Index
|
||||
settings index: { refresh_interval: '15m' }, analysis: {
|
||||
char_filter: {
|
||||
tsconvert: {
|
||||
type: 'stconvert',
|
||||
keep_both: false,
|
||||
delimiter: '#',
|
||||
convert_type: 't2s',
|
||||
},
|
||||
},
|
||||
analyzer: {
|
||||
content: {
|
||||
tokenizer: 'ik_max_word',
|
||||
filter: %w(lowercase asciifolding cjk_width),
|
||||
char_filter: %w(tsconvert),
|
||||
},
|
||||
|
||||
edge_ngram: {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue