From 75f636d1dba868db22c79b0fa3fe9d88f2d1cf4e Mon Sep 17 00:00:00 2001 From: Nafu Satsuki Date: Thu, 29 Feb 2024 15:21:44 +0900 Subject: [PATCH] =?UTF-8?q?enhance:=20Sudachi=E3=82=92=E3=83=88=E3=83=BC?= =?UTF-8?q?=E3=82=AF=E3=83=8A=E3=82=A4=E3=82=B6=E3=83=BC=E3=81=AB=E4=BD=BF?= =?UTF-8?q?=E7=94=A8=E3=81=99=E3=82=8B=E3=82=88=E3=81=86=E3=81=AB=E3=81=99?= =?UTF-8?q?=E3=82=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/backend/src/core/SearchService.ts | 31 +++++++++++++++++++++- 1 file changed, 30 insertions(+), 1 deletion(-) diff --git a/packages/backend/src/core/SearchService.ts b/packages/backend/src/core/SearchService.ts index a12450a7459e..697a17d2eeb0 100644 --- a/packages/backend/src/core/SearchService.ts +++ b/packages/backend/src/core/SearchService.ts @@ -132,7 +132,36 @@ export class SearchService { }, }, settings: { - //TODO: Make settings for optimization. + index: { + analysis: { + tokenizer: { + sudachi_c_tokenizer: { + type: 'sudachi_tokenizer', + additional_settings: '{\'systemDict\':\'system_core.dic\'}', + split_mode: 'C', + discard_punctuation: true, + }, + sudachi_a_tokenizer: { + type: 'sudachi_tokenizer', + additional_settings: '{\'systemDict\':\'system_core.dic\'}', + split_mode: 'A', + discard_punctuation: true, + }, + }, + analyzer: { + c_analyzer: { + filter: [], + tokenizer: 'sudachi_c_tokenizer', + type: 'custom', + }, + a_normalizedform_analyzer: { + filter: ['sudachi_normalizedform'], + tokenizer: 'sudachi_a_tokenizer', + type: 'custom', + }, + }, + }, + }, }, }, }).catch((error) => {