Pull request #326: RED-3243: Fixed bug in combining address parts

Merge in RED/redaction-service from RED-3243 to master

* commit '6a78d798912afd4d625455d62d2ec416a311873b':
  RED-3243: Fixed bug in combining address parts
This commit is contained in:
Dominique Eiflaender 2022-01-24 12:53:40 +01:00
commit 29ad27dea6

View File

@ -97,6 +97,8 @@ public class Section {
if(entity.getType().equals(startType) && start == -1) {
lastEnd = entity.getEnd();
start = entity.getStart();
foundParts.add(entity.getType());
numberOfMatchParts++;
} else if(!allowDuplicateTypes && foundParts.contains(entity.getType())){
if(numberOfMatchParts >= minPartMatches) {
String value = searchText.substring(start, lastEnd);