From 162a4305734dcca2ab53c3507a7f5d75e1d963ce Mon Sep 17 00:00:00 2001 From: lopes-vincent Date: Tue, 9 Apr 2019 18:24:55 +0200 Subject: [PATCH] Add german analyzer --- Config/analysis.json | 30 +++++++++++++++++++++++++++++- Config/mapping.json | 18 ++++++++++++++++++ 2 files changed, 47 insertions(+), 1 deletion(-) diff --git a/Config/analysis.json b/Config/analysis.json index 895dce4..ffb23e2 100644 --- a/Config/analysis.json +++ b/Config/analysis.json @@ -49,6 +49,30 @@ "hyphen_replace", "html_strip" ] + }, + "german_index": { + "tokenizer": "index_tokenizer", + "filter": [ + "icu_folding", + "lowercase", + "stop_de" + ], + "char_filter": [ + "hyphen_replace", + "html_strip" + ] + }, + "german_search": { + "tokenizer": "whitespace", + "filter": [ + "icu_folding", + "lowercase", + "stop_de" + ], + "char_filter": [ + "hyphen_replace", + "html_strip" + ] } }, "tokenizer": { @@ -72,6 +96,10 @@ "type": "stop", "stopwords": "_english_" }, + "stop_de": { + "type": "stop", + "stopwords": "_german_" + }, "french_elision": { "type": "elision", "articles_case": true, @@ -110,4 +138,4 @@ ] } } -} +} \ No newline at end of file diff --git a/Config/mapping.json b/Config/mapping.json index cbf9df7..df06b5d 100644 --- a/Config/mapping.json +++ b/Config/mapping.json @@ -52,6 +52,24 @@ } } }, + { + "german_templates": { + "path_match": "*.i18ns.de_DE.*", + "mapping": { + "type": "text", + "fields": { + "raw": { + "type": "keyword" + }, + "analyzed": { + "analyzer": "german_index", + "search_analyzer": "german_search", + "type": "text" + } + } + } + } + }, { "ref": { "match": "ref",