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
|
class StatusesIndex < Chewy::Index
|
||||||
settings index: { refresh_interval: '15m' }, analysis: {
|
settings index: { refresh_interval: '15m' }, analysis: {
|
||||||
filter: {
|
tokenizer: {
|
||||||
english_stop: {
|
sudachi_tokenizer: {
|
||||||
type: 'stop',
|
type: 'sudachi_tokenizer',
|
||||||
stopwords: '_english_',
|
discard_punctuation: true,
|
||||||
},
|
resources_path: '/etc/elasticsearch',
|
||||||
english_stemmer: {
|
settings_path: '/etc/elasticsearch/sudachi.json',
|
||||||
type: 'stemmer',
|
additional_settings: {
|
||||||
language: 'english',
|
systemDict: 'system_full.dic',
|
||||||
},
|
userDict: [],
|
||||||
english_possessive_stemmer: {
|
},
|
||||||
type: 'stemmer',
|
|
||||||
language: 'possessive_english',
|
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
analyzer: {
|
analyzer: {
|
||||||
content: {
|
content: {
|
||||||
tokenizer: 'uax_url_email',
|
|
||||||
filter: %w(
|
filter: %w(
|
||||||
english_possessive_stemmer
|
|
||||||
lowercase
|
lowercase
|
||||||
asciifolding
|
|
||||||
cjk_width
|
cjk_width
|
||||||
english_stop
|
sudachi_part_of_speech
|
||||||
english_stemmer
|
sudachi_ja_stop
|
||||||
|
sudachi_baseform
|
||||||
),
|
),
|
||||||
|
tokenizer: 'sudachi_tokenizer',
|
||||||
|
type: 'custom',
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue