smart reanalysis based on sections to reanalyse provided by search service
This commit is contained in:
parent
77ece8b0d6
commit
cf12e58c77
@ -7,6 +7,7 @@ import lombok.NoArgsConstructor;
|
|||||||
|
|
||||||
import java.time.OffsetDateTime;
|
import java.time.OffsetDateTime;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
import java.util.HashSet;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
|
|
||||||
@ -22,7 +23,11 @@ public class AnalyzeRequest {
|
|||||||
private boolean reanalyseOnlyIfPossible;
|
private boolean reanalyseOnlyIfPossible;
|
||||||
private ManualRedactions manualRedactions;
|
private ManualRedactions manualRedactions;
|
||||||
private OffsetDateTime lastProcessed;
|
private OffsetDateTime lastProcessed;
|
||||||
private Set<Integer> excludedPages;
|
|
||||||
|
@Builder.Default
|
||||||
|
private Set<Integer> excludedPages = new HashSet<>();
|
||||||
|
@Builder.Default
|
||||||
|
private Set<Integer> sectionsToReanalyse = new HashSet<>();
|
||||||
|
|
||||||
@Builder.Default
|
@Builder.Default
|
||||||
private List<FileAttribute> fileAttributes = new ArrayList<>();
|
private List<FileAttribute> fileAttributes = new ArrayList<>();
|
||||||
|
|||||||
@ -106,7 +106,8 @@ public class ReanalyzeService {
|
|||||||
DictionaryIncrement dictionaryIncrement = dictionaryService.getDictionaryIncrements(analyzeRequest.getDossierTemplateId(), new DictionaryVersion(redactionLog
|
DictionaryIncrement dictionaryIncrement = dictionaryService.getDictionaryIncrements(analyzeRequest.getDossierTemplateId(), new DictionaryVersion(redactionLog
|
||||||
.getDictionaryVersion(), redactionLog.getDossierDictionaryVersion()), analyzeRequest.getDossierId());
|
.getDictionaryVersion(), redactionLog.getDossierDictionaryVersion()), analyzeRequest.getDossierId());
|
||||||
|
|
||||||
Set<Integer> sectionsToReanalyse = findSectionsToReanalyse(dictionaryIncrement, redactionLog, text, analyzeRequest);
|
Set<Integer> sectionsToReanalyse = !analyzeRequest.getSectionsToReanalyse().isEmpty() ? analyzeRequest.getSectionsToReanalyse() :
|
||||||
|
findSectionsToReanalyse(dictionaryIncrement, redactionLog, text, analyzeRequest);
|
||||||
|
|
||||||
if (sectionsToReanalyse.isEmpty()) {
|
if (sectionsToReanalyse.isEmpty()) {
|
||||||
return finalizeAnalysis(analyzeRequest, startTime, redactionLog, text, dictionaryIncrement);
|
return finalizeAnalysis(analyzeRequest, startTime, redactionLog, text, dictionaryIncrement);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user