From 2c6e9c1109c8ccb763cb54d6f112c79fea9701fb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Katja=20Su=CC=88ss?= Date: Thu, 4 Apr 2024 10:11:32 +0200 Subject: [PATCH] Update analysis default configuration --- examples/analysis/analysis-german.json | 12 ++++++++---- examples/analysis/elasticsearch-keywords-german.txt | 1 + examples/analysis/elasticsearch-lexicon-german.txt | 6 +++--- 3 files changed, 12 insertions(+), 7 deletions(-) create mode 100644 examples/analysis/elasticsearch-keywords-german.txt diff --git a/examples/analysis/analysis-german.json b/examples/analysis/analysis-german.json index 90e6b1b..aec3d63 100644 --- a/examples/analysis/analysis-german.json +++ b/examples/analysis/analysis-german.json @@ -7,11 +7,11 @@ "filter": [ "lowercase", "custom_dictionary_decompounder", - "light_german_stemmer", - "unique" + "no_stem", + "light_german_stemmer" ] }, - "german_exact": { + "german_exact_analyzer": { "tokenizer": "standard", "filter": [ "lowercase" @@ -21,7 +21,11 @@ "filter": { "custom_dictionary_decompounder": { "type": "dictionary_decompounder", - "word_list_path": "elasticsearch-lexicon.txt" + "word_list_path": "elasticsearch-lexicon-german.txt" + }, + "no_stem": { + "type": "keyword_marker", + "keywords_path": "elasticsearch-keywords-german.txt" }, "light_german_stemmer": { "type": "stemmer", diff --git a/examples/analysis/elasticsearch-keywords-german.txt b/examples/analysis/elasticsearch-keywords-german.txt new file mode 100644 index 0000000..f9dec30 --- /dev/null +++ b/examples/analysis/elasticsearch-keywords-german.txt @@ -0,0 +1 @@ +börse \ No newline at end of file diff --git a/examples/analysis/elasticsearch-lexicon-german.txt b/examples/analysis/elasticsearch-lexicon-german.txt index 753a172..496b038 100644 --- a/examples/analysis/elasticsearch-lexicon-german.txt +++ b/examples/analysis/elasticsearch-lexicon-german.txt @@ -1,3 +1,3 @@ -abschluss -abteilung -adresse \ No newline at end of file +lehr +stell +börse \ No newline at end of file