Merge remote-tracking branch 'parent/main' into kb_migration

This commit is contained in:
KMY 2023-08-29 13:25:48 +09:00
commit 05a022448b
22 changed files with 306 additions and 209 deletions

View file

@ -19,13 +19,19 @@ class StatusesIndex < Chewy::Index
},
},
analyzer: {
content: {
verbatim: {
tokenizer: 'uax_url_email',
filter: %w(lowercase),
},
content: {
tokenizer: 'standard',
filter: %w(
english_possessive_stemmer
lowercase
asciifolding
cjk_width
elision
english_possessive_stemmer
english_stop
english_stemmer
),
@ -133,7 +139,7 @@ class StatusesIndex < Chewy::Index
end
root date_detection: false do
field(:id, type: 'keyword')
field(:id, type: 'long')
field(:account_id, type: 'long')
field(:text, type: 'text', analyzer: 'sudachi_analyzer', value: ->(status) { status.searchable_text }) { field(:stemmed, type: 'text', analyzer: 'content') }
field(:searchable_by, type: 'long', value: ->(status, crutches) { status.searchable_by(crutches) })