RED-8702: Explore document databases to store entityLog
* fix for duplicate key exception
This commit is contained in:
parent
146ec1f3c8
commit
0818bfd490
@ -12,7 +12,7 @@ plugins {
|
|||||||
description = "redaction-service-server-v1"
|
description = "redaction-service-server-v1"
|
||||||
|
|
||||||
|
|
||||||
val layoutParserVersion = "0.96.0"
|
val layoutParserVersion = "maverick-mongo-eval"
|
||||||
val jacksonVersion = "2.15.2"
|
val jacksonVersion = "2.15.2"
|
||||||
val droolsVersion = "9.44.0.Final"
|
val droolsVersion = "9.44.0.Final"
|
||||||
val pdfBoxVersion = "3.0.0"
|
val pdfBoxVersion = "3.0.0"
|
||||||
|
|||||||
@ -71,9 +71,7 @@ public class EntityLogCreatorService {
|
|||||||
|
|
||||||
List<EntityLogEntry> previousExistingEntityLogEntries = getPreviousEntityLogEntries(analyzeRequest.getDossierId(), analyzeRequest.getFileId());
|
List<EntityLogEntry> previousExistingEntityLogEntries = getPreviousEntityLogEntries(analyzeRequest.getDossierId(), analyzeRequest.getFileId());
|
||||||
|
|
||||||
EntryChanges entryChanges = entityChangeLogService.computeChanges(//analyzeRequest.getDossierId(),
|
EntryChanges entryChanges = entityChangeLogService.computeChanges(previousExistingEntityLogEntries, entityLogEntries, analyzeRequest.getAnalysisNumber());
|
||||||
//analyzeRequest.getFileId(),
|
|
||||||
previousExistingEntityLogEntries, entityLogEntries, analyzeRequest.getAnalysisNumber());
|
|
||||||
|
|
||||||
return EntityLogChanges.builder()
|
return EntityLogChanges.builder()
|
||||||
.entityLog(new EntityLog(redactionServiceSettings.getAnalysisVersion(),
|
.entityLog(new EntityLog(redactionServiceSettings.getAnalysisVersion(),
|
||||||
|
|||||||
@ -146,6 +146,18 @@ public class RedactionIntegrationTest extends RulesIntegrationTest {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void testFludioxonilDuplicatedImageEntries() {
|
||||||
|
|
||||||
|
AnalyzeRequest request = prepareStorage("files/Fludioxonil/Fludioxonil_duplicates.pdf",
|
||||||
|
"files/cv_service_empty_response.json", "files/image_info_fludioxonil_duplicates.json");
|
||||||
|
|
||||||
|
analyzeDocumentStructure(LayoutParsingType.REDACT_MANAGER, request);
|
||||||
|
AnalyzeResult result = analyzeService.analyze(request);
|
||||||
|
assertThat(result).isNotNull();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@Disabled
|
@Disabled
|
||||||
public void testLargeScannedFileOOM() {
|
public void testLargeScannedFileOOM() {
|
||||||
|
|||||||
Binary file not shown.
@ -0,0 +1,303 @@
|
|||||||
|
{
|
||||||
|
"dossierId": "c4849583-af00-4bef-934f-491ef761e984",
|
||||||
|
"fileId": "790c52eb58e02f2b3b3b2b19ec7d6e1e",
|
||||||
|
"targetFileExtension": "ORIGIN.pdf.gz",
|
||||||
|
"responseFileExtension": "IMAGE_INFO.json.gz",
|
||||||
|
"X-TENANT-ID": "redaction",
|
||||||
|
"data": [
|
||||||
|
{
|
||||||
|
"classification": {
|
||||||
|
"label": "formula",
|
||||||
|
"probabilities": {
|
||||||
|
"formula": 1.0,
|
||||||
|
"logo": 0.0,
|
||||||
|
"other": 0.0,
|
||||||
|
"signature": 0.0
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"representation": "44CF9F4E3EFAF3FFCF3FFCF3F",
|
||||||
|
"position": {
|
||||||
|
"x1": 71,
|
||||||
|
"x2": 511,
|
||||||
|
"y1": 627,
|
||||||
|
"y2": 736,
|
||||||
|
"pageNumber": 5
|
||||||
|
},
|
||||||
|
"geometry": {
|
||||||
|
"width": 440,
|
||||||
|
"height": 109
|
||||||
|
},
|
||||||
|
"alpha": false,
|
||||||
|
"filters": {
|
||||||
|
"geometry": {
|
||||||
|
"imageSize": {
|
||||||
|
"quotient": 0.3094,
|
||||||
|
"tooLarge": false,
|
||||||
|
"tooSmall": false
|
||||||
|
},
|
||||||
|
"imageFormat": {
|
||||||
|
"quotient": 4.0367,
|
||||||
|
"tooTall": false,
|
||||||
|
"tooWide": false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"probability": {
|
||||||
|
"unconfident": false
|
||||||
|
},
|
||||||
|
"allPassed": true
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"classification": {
|
||||||
|
"label": "formula",
|
||||||
|
"probabilities": {
|
||||||
|
"formula": 1.0,
|
||||||
|
"logo": 0.0,
|
||||||
|
"other": 0.0,
|
||||||
|
"signature": 0.0
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"representation": "FFFFF78F1EFBC32F8F717FCF1",
|
||||||
|
"position": {
|
||||||
|
"x1": 71,
|
||||||
|
"x2": 511,
|
||||||
|
"y1": 410,
|
||||||
|
"y2": 519,
|
||||||
|
"pageNumber": 5
|
||||||
|
},
|
||||||
|
"geometry": {
|
||||||
|
"width": 440,
|
||||||
|
"height": 109
|
||||||
|
},
|
||||||
|
"alpha": false,
|
||||||
|
"filters": {
|
||||||
|
"geometry": {
|
||||||
|
"imageSize": {
|
||||||
|
"quotient": 0.3094,
|
||||||
|
"tooLarge": false,
|
||||||
|
"tooSmall": false
|
||||||
|
},
|
||||||
|
"imageFormat": {
|
||||||
|
"quotient": 4.0367,
|
||||||
|
"tooTall": false,
|
||||||
|
"tooWide": false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"probability": {
|
||||||
|
"unconfident": false
|
||||||
|
},
|
||||||
|
"allPassed": true
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"classification": {
|
||||||
|
"label": "formula",
|
||||||
|
"probabilities": {
|
||||||
|
"formula": 1.0,
|
||||||
|
"logo": 0.0,
|
||||||
|
"other": 0.0,
|
||||||
|
"signature": 0.0
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"representation": "FFCF3FFFFFCC733DE63B00038",
|
||||||
|
"position": {
|
||||||
|
"x1": 71,
|
||||||
|
"x2": 511,
|
||||||
|
"y1": 519,
|
||||||
|
"y2": 628,
|
||||||
|
"pageNumber": 5
|
||||||
|
},
|
||||||
|
"geometry": {
|
||||||
|
"width": 440,
|
||||||
|
"height": 109
|
||||||
|
},
|
||||||
|
"alpha": false,
|
||||||
|
"filters": {
|
||||||
|
"geometry": {
|
||||||
|
"imageSize": {
|
||||||
|
"quotient": 0.3094,
|
||||||
|
"tooLarge": false,
|
||||||
|
"tooSmall": false
|
||||||
|
},
|
||||||
|
"imageFormat": {
|
||||||
|
"quotient": 4.0367,
|
||||||
|
"tooTall": false,
|
||||||
|
"tooWide": false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"probability": {
|
||||||
|
"unconfident": false
|
||||||
|
},
|
||||||
|
"allPassed": true
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"classification": {
|
||||||
|
"label": "formula",
|
||||||
|
"probabilities": {
|
||||||
|
"formula": 1.0,
|
||||||
|
"logo": 0.0,
|
||||||
|
"other": 0.0,
|
||||||
|
"signature": 0.0
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"representation": "FFF6D344888AE08B5F6DB1FFF",
|
||||||
|
"position": {
|
||||||
|
"x1": 196,
|
||||||
|
"x2": 302,
|
||||||
|
"y1": 453,
|
||||||
|
"y2": 523,
|
||||||
|
"pageNumber": 6
|
||||||
|
},
|
||||||
|
"geometry": {
|
||||||
|
"width": 106,
|
||||||
|
"height": 70
|
||||||
|
},
|
||||||
|
"alpha": false,
|
||||||
|
"filters": {
|
||||||
|
"geometry": {
|
||||||
|
"imageSize": {
|
||||||
|
"quotient": 0.1217,
|
||||||
|
"tooLarge": false,
|
||||||
|
"tooSmall": false
|
||||||
|
},
|
||||||
|
"imageFormat": {
|
||||||
|
"quotient": 1.5143,
|
||||||
|
"tooTall": false,
|
||||||
|
"tooWide": false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"probability": {
|
||||||
|
"unconfident": false
|
||||||
|
},
|
||||||
|
"allPassed": true
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"classification": {
|
||||||
|
"label": "formula",
|
||||||
|
"probabilities": {
|
||||||
|
"formula": 1.0,
|
||||||
|
"logo": 0.0,
|
||||||
|
"other": 0.0,
|
||||||
|
"signature": 0.0
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"representation": "FFF6B30E904BE08F0F3DF9FFF",
|
||||||
|
"position": {
|
||||||
|
"x1": 196,
|
||||||
|
"x2": 303,
|
||||||
|
"y1": 217,
|
||||||
|
"y2": 284,
|
||||||
|
"pageNumber": 6
|
||||||
|
},
|
||||||
|
"geometry": {
|
||||||
|
"width": 107,
|
||||||
|
"height": 67
|
||||||
|
},
|
||||||
|
"alpha": false,
|
||||||
|
"filters": {
|
||||||
|
"geometry": {
|
||||||
|
"imageSize": {
|
||||||
|
"quotient": 0.1196,
|
||||||
|
"tooLarge": false,
|
||||||
|
"tooSmall": false
|
||||||
|
},
|
||||||
|
"imageFormat": {
|
||||||
|
"quotient": 1.597,
|
||||||
|
"tooTall": false,
|
||||||
|
"tooWide": false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"probability": {
|
||||||
|
"unconfident": false
|
||||||
|
},
|
||||||
|
"allPassed": true
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"classification": {
|
||||||
|
"label": "formula",
|
||||||
|
"probabilities": {
|
||||||
|
"formula": 1.0,
|
||||||
|
"logo": 0.0,
|
||||||
|
"other": 0.0,
|
||||||
|
"signature": 0.0
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"representation": "FFF7D14488FA60844F1D39FFF",
|
||||||
|
"position": {
|
||||||
|
"x1": 197,
|
||||||
|
"x2": 301,
|
||||||
|
"y1": 379,
|
||||||
|
"y2": 449,
|
||||||
|
"pageNumber": 6
|
||||||
|
},
|
||||||
|
"geometry": {
|
||||||
|
"width": 104,
|
||||||
|
"height": 70
|
||||||
|
},
|
||||||
|
"alpha": false,
|
||||||
|
"filters": {
|
||||||
|
"geometry": {
|
||||||
|
"imageSize": {
|
||||||
|
"quotient": 0.1205,
|
||||||
|
"tooLarge": false,
|
||||||
|
"tooSmall": false
|
||||||
|
},
|
||||||
|
"imageFormat": {
|
||||||
|
"quotient": 1.4857,
|
||||||
|
"tooTall": false,
|
||||||
|
"tooWide": false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"probability": {
|
||||||
|
"unconfident": false
|
||||||
|
},
|
||||||
|
"allPassed": true
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"classification": {
|
||||||
|
"label": "formula",
|
||||||
|
"probabilities": {
|
||||||
|
"formula": 1.0,
|
||||||
|
"logo": 0.0,
|
||||||
|
"other": 0.0,
|
||||||
|
"signature": 0.0
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"representation": "FFFFCB3468BD60842F9CF8F7F",
|
||||||
|
"position": {
|
||||||
|
"x1": 208,
|
||||||
|
"x2": 290,
|
||||||
|
"y1": 304,
|
||||||
|
"y2": 374,
|
||||||
|
"pageNumber": 6
|
||||||
|
},
|
||||||
|
"geometry": {
|
||||||
|
"width": 82,
|
||||||
|
"height": 70
|
||||||
|
},
|
||||||
|
"alpha": false,
|
||||||
|
"filters": {
|
||||||
|
"geometry": {
|
||||||
|
"imageSize": {
|
||||||
|
"quotient": 0.107,
|
||||||
|
"tooLarge": false,
|
||||||
|
"tooSmall": false
|
||||||
|
},
|
||||||
|
"imageFormat": {
|
||||||
|
"quotient": 1.1714,
|
||||||
|
"tooTall": false,
|
||||||
|
"tooWide": false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"probability": {
|
||||||
|
"unconfident": false
|
||||||
|
},
|
||||||
|
"allPassed": true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
Loading…
x
Reference in New Issue
Block a user