Set up elasticsearch 7 to use sudachi
This commit is contained in:
parent
fed4eaf5f3
commit
40db10417c
1 changed files with 15 additions and 17 deletions
|
@ -2,31 +2,29 @@
|
|||
|
||||
class StatusesIndex < Chewy::Index
|
||||
settings index: { refresh_interval: '15m' }, analysis: {
|
||||
filter: {
|
||||
english_stop: {
|
||||
type: 'stop',
|
||||
stopwords: '_english_',
|
||||
},
|
||||
english_stemmer: {
|
||||
type: 'stemmer',
|
||||
language: 'english',
|
||||
},
|
||||
english_possessive_stemmer: {
|
||||
type: 'stemmer',
|
||||
language: 'possessive_english',
|
||||
tokenizer: {
|
||||
sudachi_tokenizer: {
|
||||
type: 'sudachi_tokenizer',
|
||||
discard_punctuation: true,
|
||||
resources_path: '/etc/elasticsearch',
|
||||
settings_path: '/etc/elasticsearch/sudachi.json',
|
||||
additional_settings: {
|
||||
systemDict: 'system_full.dic',
|
||||
userDict: [],
|
||||
},
|
||||
},
|
||||
},
|
||||
analyzer: {
|
||||
content: {
|
||||
tokenizer: 'uax_url_email',
|
||||
filter: %w(
|
||||
english_possessive_stemmer
|
||||
lowercase
|
||||
asciifolding
|
||||
cjk_width
|
||||
english_stop
|
||||
english_stemmer
|
||||
sudachi_part_of_speech
|
||||
sudachi_ja_stop
|
||||
sudachi_baseform
|
||||
),
|
||||
tokenizer: 'sudachi_tokenizer',
|
||||
type: 'custom',
|
||||
},
|
||||
},
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue