diff --git a/Kitodo-DataManagement/src/main/java/org/kitodo/data/database/beans/IndexingKeyworder.java b/Kitodo-DataManagement/src/main/java/org/kitodo/data/database/beans/IndexingKeyworder.java index 8d1fe51639d..f4b773ac44b 100644 --- a/Kitodo-DataManagement/src/main/java/org/kitodo/data/database/beans/IndexingKeyworder.java +++ b/Kitodo-DataManagement/src/main/java/org/kitodo/data/database/beans/IndexingKeyworder.java @@ -337,14 +337,17 @@ private static Map> getRulesetLabelMap(String file) { String ruleset = FileUtils.readFileToString(rulesetFile, StandardCharsets.UTF_8); rulesetLabelMap = new HashMap<>(); Matcher keysMatcher = RULESET_KEY_PATTERN.matcher(ruleset); - Set labels = new HashSet<>(); while (keysMatcher.find()) { String key = normalize(keysMatcher.group(1)); Matcher labelMatcher = RULESET_LABEL_PATTERN.matcher(keysMatcher.group(2)); + Set labels = new HashSet<>(); while (labelMatcher.find()) { labels.add(normalize(labelMatcher.group(1))); } rulesetLabelMap.put(key, labels); + if (logger.isTraceEnabled()) { + logger.trace("- {} -> {}", key, String.join(", ", labels)); + } } rulesetCache.put(file, rulesetLabelMap); return rulesetLabelMap;