From a2e674af51c1a26bfaef48f4cdb049c3c8919ffc Mon Sep 17 00:00:00 2001 From: KMY Date: Wed, 5 Apr 2023 18:22:00 +0900 Subject: [PATCH] Update sudachi settings --- app/chewy/statuses_index.rb | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/app/chewy/statuses_index.rb b/app/chewy/statuses_index.rb index a185b7ce29..28dace0f98 100644 --- a/app/chewy/statuses_index.rb +++ b/app/chewy/statuses_index.rb @@ -30,7 +30,20 @@ class StatusesIndex < Chewy::Index english_stemmer ), }, + sudachi_analyzer: { + filter: [], + type: 'custom', + tokenizer: 'sudachi_tokenizer', + }, }, + tokenizer: { + sudachi_tokenizer: { + resources_path: '/etc/elasticsearch/sudachi', + split_mode: 'C', + type: 'sudachi_tokenizer', + discard_punctuation: 'true', + } + } } # We do not use delete_if option here because it would call a method that we