diff --git a/redaction-service-v1/redaction-service-server-v1/src/main/java/com/iqser/red/service/redaction/v1/server/redaction/service/AnalyzeService.java b/redaction-service-v1/redaction-service-server-v1/src/main/java/com/iqser/red/service/redaction/v1/server/redaction/service/AnalyzeService.java index ba6d0d3e..84232b0d 100644 --- a/redaction-service-v1/redaction-service-server-v1/src/main/java/com/iqser/red/service/redaction/v1/server/redaction/service/AnalyzeService.java +++ b/redaction-service-v1/redaction-service-server-v1/src/main/java/com/iqser/red/service/redaction/v1/server/redaction/service/AnalyzeService.java @@ -36,6 +36,7 @@ import com.iqser.red.service.redaction.v1.server.client.model.NerEntities; import com.iqser.red.service.redaction.v1.server.exception.RedactionException; import com.iqser.red.service.redaction.v1.server.redaction.model.Dictionary; import com.iqser.red.service.redaction.v1.server.redaction.model.DictionaryIncrement; +import com.iqser.red.service.redaction.v1.server.redaction.model.DictionaryIncrementValue; import com.iqser.red.service.redaction.v1.server.redaction.model.DictionaryVersion; import com.iqser.red.service.redaction.v1.server.redaction.model.Image; import com.iqser.red.service.redaction.v1.server.redaction.model.PageEntities; @@ -182,7 +183,7 @@ public class AnalyzeService { long importedRedactionFilteredStartTime = System.currentTimeMillis(); var importedRedactionFilteredEntries = importedRedactionService.processImportedRedactions(analyzeRequest.getDossierTemplateId(), analyzeRequest.getDossierId(), analyzeRequest.getFileId(), newRedactionLogEntries, false); - + redactionLog.getRedactionLogEntry() .removeIf(entry -> sectionsToReanalyse.contains(entry.getSectionNumber()) && !entry.getType() .equals(IMPORTED_REDACTION_TYPE)); @@ -228,6 +229,9 @@ public class AnalyzeService { private Set findSectionsToReanalyse(DictionaryIncrement dictionaryIncrement, RedactionLog redactionLog, Text text, AnalyzeRequest analyzeRequest) { + + log.info("dictionaryIncrement.getValues(): {}", dictionaryIncrement.getValues().stream().map(DictionaryIncrementValue::getValue).collect(Collectors.toList())); + long start = System.currentTimeMillis(); Set relevantManuallyModifiedAnnotationIds = getRelevantManuallyModifiedAnnotationIds(analyzeRequest.getManualRedactions()); @@ -235,6 +239,7 @@ public class AnalyzeService { Map> imageEntries = new HashMap<>(); for (RedactionLogEntry entry : redactionLog.getRedactionLogEntry()) { if (entry.isLocalManualRedaction() || relevantManuallyModifiedAnnotationIds.contains(entry.getId())) { + log.info("entry.isLocalManualRedaction() {}, relevantManuallyModifiedAnnotationIds.contains(entry.getId()) {} sectionNr {}", entry.isLocalManualRedaction(),relevantManuallyModifiedAnnotationIds.contains(entry.getId()), entry.getSectionNumber()); sectionsToReanalyse.add(entry.getSectionNumber()); } if (entry.isImage()) { @@ -245,6 +250,7 @@ public class AnalyzeService { for (SectionText sectionText : text.getSectionTexts()) { if (EntitySearchUtils.sectionContainsAny(sectionText.getText(), dictionaryIncrement.getValues())) { + log.info("Added sectionNr {} because EntitySearchUtils.sectionContainsAny()" ,sectionText.getSectionNumber()) ; sectionsToReanalyse.add(sectionText.getSectionNumber()); }