RED-809: Added flag to AnalysisResult to see if a reanalysis or normal analysis was performed

This commit is contained in:
Dominique Eifländer 2021-07-05 14:28:53 +02:00
parent fa47da1aed
commit 041a3c87ae
2 changed files with 5 additions and 2 deletions

View File

@ -25,6 +25,8 @@ public class AnalyzeResult {
private long rulesVersion;
private long legalBasisVersion;
private boolean wasReanalyzed;
}

View File

@ -269,8 +269,9 @@ public class ReanalyzeService {
redactionLog.getRedactionLogEntry().removeIf(entry -> sectionsToReanalyse.contains(entry.getSectionNumber()));
redactionLog.getRedactionLogEntry().addAll(newRedactionLogEntries);
return finalizeAnalysis(analyzeRequest, startTime, redactionLog, text, dictionaryIncrement);
AnalyzeResult analyzeResult = finalizeAnalysis(analyzeRequest, startTime, redactionLog, text, dictionaryIncrement);
analyzeResult.setWasReanalyzed(true);
return analyzeResult;
}