From b49f81b66d0a5a928f3a1f0d2421424acf3819e4 Mon Sep 17 00:00:00 2001 From: ghost Date: Mon, 12 Feb 2024 16:30:26 +0200 Subject: [PATCH] init config --- .gitignore | 3 ++- example/config.json | 16 ++++++++++++++++ src/index.php | 19 +++++++++++++++++++ 3 files changed, 37 insertions(+), 1 deletion(-) create mode 100644 example/config.json create mode 100644 src/index.php diff --git a/.gitignore b/.gitignore index 05388a6..e127e2c 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ /vendor/ -composer.lock \ No newline at end of file +/composer.lock +/config.json \ No newline at end of file diff --git a/example/config.json b/example/config.json new file mode 100644 index 0000000..dcd5571 --- /dev/null +++ b/example/config.json @@ -0,0 +1,16 @@ +{ + "index": + { + "name":"kvazar", + "host":"127.0.0.1", + "port":9308, + "meta": + { + "morphology":"stem_cz,stem_enru", + "index_exact_words":1, + "html_strip":1, + "min_word_len":3, + "min_prefix_len":3 + } + } +} \ No newline at end of file diff --git a/src/index.php b/src/index.php new file mode 100644 index 0000000..69483ca --- /dev/null +++ b/src/index.php @@ -0,0 +1,19 @@ +index->name, + (array) $config->index->meta, + (string) $config->index->host, + (int) $config->index->port +); \ No newline at end of file