Skip to content

Commit

Permalink
Add german analyzer
Browse files Browse the repository at this point in the history
  • Loading branch information
lopes-vincent committed Apr 9, 2019
1 parent b240324 commit 162a430
Show file tree
Hide file tree
Showing 2 changed files with 47 additions and 1 deletion.
30 changes: 29 additions & 1 deletion Config/analysis.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": {
Expand All @@ -72,6 +96,10 @@
"type": "stop",
"stopwords": "_english_"
},
"stop_de": {
"type": "stop",
"stopwords": "_german_"
},
"french_elision": {
"type": "elision",
"articles_case": true,
Expand Down Expand Up @@ -110,4 +138,4 @@
]
}
}
}
}
18 changes: 18 additions & 0 deletions Config/mapping.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down

0 comments on commit 162a430

Please sign in to comment.