From 8a827bfcdff171470682892164f6128e85dde333 Mon Sep 17 00:00:00 2001 From: ghost Date: Sat, 25 Nov 2023 17:14:36 +0200 Subject: [PATCH] update settings definition --- example/config.json | 7 +------ src/cli/index/init.php | 11 +---------- 2 files changed, 2 insertions(+), 16 deletions(-) diff --git a/example/config.json b/example/config.json index c1e8432..65bcce3 100644 --- a/example/config.json +++ b/example/config.json @@ -12,12 +12,7 @@ "name":"yo_document", "settings": { - "morphology": - [ - "stem_cz", - "stem_ar", - "stem_enru" - ], + "morphology":"stem_cz,stem_enru", "index_exact_words":1, "html_strip":1, "min_word_len":3, diff --git a/src/cli/index/init.php b/src/cli/index/init.php index 0ac696e..e35fd2c 100644 --- a/src/cli/index/init.php +++ b/src/cli/index/init.php @@ -81,16 +81,7 @@ $result = $index->create( 'type' => 'integer' ] ], - [ - 'index_exact_words' => $config->manticore->index->document->settings->index_exact_words, - 'html_strip' => $config->manticore->index->document->settings->html_strip, - 'min_word_len' => $config->manticore->index->document->settings->min_word_len, - 'min_prefix_len' => $config->manticore->index->document->settings->min_prefix_len, - 'morphology' => implode( - ',', - $config->manticore->index->document->settings->morphology - ) - ] + (array) $config->manticore->index->document->settings ); echo sprintf(