Skip to content

Commit

Permalink
Prevent mapper parsing exception: Normalizer 'lowercase' not found
Browse files Browse the repository at this point in the history
  • Loading branch information
matthias-ronge committed Feb 1, 2024
1 parent c001dd7 commit c3b476e
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -466,7 +466,8 @@ public String deleteIndex() {
}

private boolean isMappingValid(String mapping, String mappingType) {
return isMappingEqualTo(mapping, mappingType);
String onlyMappings = mapping.replaceFirst("^\\{.+?\"mappings\"", "\\{\"mappings\"");
return isMappingEqualTo(onlyMappings, mappingType);
}


Expand Down
10 changes: 10 additions & 0 deletions Kitodo/src/main/resources/elasticsearch_mappings/process.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,14 @@
{
"settings": {
"analysis": {
"normalizer": {
"lowercase": {
"type": "custom",
"filter": ["lowercase"]
}
}
}
},
"mappings": {
"dynamic": "strict",
"properties": {
Expand Down
10 changes: 10 additions & 0 deletions Kitodo/src/main/resources/elasticsearch_mappings/task.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,14 @@
{
"settings": {
"analysis": {
"normalizer": {
"lowercase": {
"type": "custom",
"filter": ["lowercase"]
}
}
}
},
"mappings": {
"dynamic": "strict",
"properties": {
Expand Down

0 comments on commit c3b476e

Please sign in to comment.