kuromojiの件を差し戻し

This commit is contained in:
nagoya 2024-09-01 15:29:24 +09:00
parent ad7c411f83
commit c840249030

View File

@ -1,12 +1,9 @@
# kuromoji, analysis-icuの記述を追加
# refresh_intevalを30s->5mに変更(なんとなく)
# frozen_string_literal: true
class StatusesIndex < Chewy::Index
include DatetimeClampingConcern
settings index: index_preset(refresh_interval: '5m', number_of_shards: 5), analysis: {
settings index: index_preset(refresh_interval: '30s', number_of_shards: 5), analysis: {
filter: {
english_stop: {
type: 'stop',
@ -23,13 +20,6 @@ class StatusesIndex < Chewy::Index
language: 'possessive_english',
},
},
tokenizer: {
kuromoji: {
type: 'kuromoji_tokenizer',
#mode: 'search',
}
}
analyzer: {
verbatim: {
@ -38,23 +28,13 @@ class StatusesIndex < Chewy::Index
},
content: {
tokenizer: 'kuromoji',
type: 'custom',
char_filter: %w(
icu_normalizer
html_strip
kuromoji_iteration_mark
),
tokenizer: 'standard',
filter: %w(
english_possessive_stemmer
lowercase
asciifolding
kuromoji_stemmer
kuromoji_number
kuromoji_baseform
icu_nomalizer
cjk_width
elision
english_possessive_stemmer
english_stop
english_stemmer
),
@ -84,4 +64,4 @@ class StatusesIndex < Chewy::Index
field(:properties, type: 'keyword', value: ->(status) { status.searchable_properties })
field(:created_at, type: 'date', value: ->(status) { clamp_date(status.created_at) })
end
end
end