From 8dbc610125deb8eabd0c119b6373766c5b942432 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=82=AA=E3=82=B9=E3=82=AB=E3=83=BC=E3=80=81?= Date: Thu, 10 Oct 2024 19:47:34 +0900 Subject: [PATCH] enhance: use nori --- app/chewy/public_statuses_index.rb | 9 ++++++++- app/chewy/statuses_index.rb | 9 ++++++++- 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/app/chewy/public_statuses_index.rb b/app/chewy/public_statuses_index.rb index 09a4dfc09..c77aa853e 100644 --- a/app/chewy/public_statuses_index.rb +++ b/app/chewy/public_statuses_index.rb @@ -21,6 +21,13 @@ class PublicStatusesIndex < Chewy::Index }, }, + tokenizer: { + nori: { + type: 'nori_tokenizer', + decompound_mode: 'mixed', + }, + }, + analyzer: { verbatim: { tokenizer: 'uax_url_email', @@ -28,7 +35,7 @@ class PublicStatusesIndex < Chewy::Index }, content: { - tokenizer: 'standard', + tokenizer: 'nori', filter: %w( lowercase asciifolding diff --git a/app/chewy/statuses_index.rb b/app/chewy/statuses_index.rb index e739ccecb..d445638c4 100644 --- a/app/chewy/statuses_index.rb +++ b/app/chewy/statuses_index.rb @@ -21,6 +21,13 @@ class StatusesIndex < Chewy::Index }, }, + tokenizer: { + nori: { + type: 'nori_tokenizer', + decompound_mode: 'mixed', + }, + }, + analyzer: { verbatim: { tokenizer: 'uax_url_email', @@ -28,7 +35,7 @@ class StatusesIndex < Chewy::Index }, content: { - tokenizer: 'standard', + tokenizer: 'nori', filter: %w( lowercase asciifolding