Pull request #253: RED-2224: Fixed missing values in engines
Merge in RED/redaction-service from RED-2224 to master * commit 'fa8f598763efb334e21624df468d7e1802477076': RED-2224: Fixed missing values in engines
This commit is contained in:
commit
fbad9a759b
@ -209,10 +209,10 @@ public class EntityRedactionService {
|
||||
for (DictionaryModel model : dictionary.getDictionaryModels()) {
|
||||
if (model.isCaseInsensitive()) {
|
||||
EntitySearchUtils.addOrAddEngine(found, EntitySearchUtils.find(lowercaseInputString, model.getValues(local), model
|
||||
.getType(), headline, sectionNumber, !local, model.isDossierDictionary(), Engine.DICTIONARY));
|
||||
.getType(), headline, sectionNumber, !local, model.isDossierDictionary(), local ? Engine.RULE : Engine.DICTIONARY));
|
||||
} else {
|
||||
EntitySearchUtils.addOrAddEngine(found, EntitySearchUtils.find(searchableString, model.getValues(local), model
|
||||
.getType(), headline, sectionNumber, !local, model.isDossierDictionary(), Engine.DICTIONARY));
|
||||
.getType(), headline, sectionNumber, !local, model.isDossierDictionary(), local ? Engine.RULE : Engine.DICTIONARY));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -146,11 +146,11 @@ public class EntitySearchUtils {
|
||||
}
|
||||
var existing = existingOptional.get();
|
||||
|
||||
if (dictionary.getDictionaryRank(existing.getType()) <= dictionary.getDictionaryRank(found.getType())) {
|
||||
if(existing.getType().equals(found.getType())){
|
||||
existing.getEngines().addAll(found.getEngines());
|
||||
} else if (dictionary.getDictionaryRank(existing.getType()) <= dictionary.getDictionaryRank(found.getType())){
|
||||
entities.remove(found);
|
||||
entities.add(found);
|
||||
} else {
|
||||
existing.getEngines().addAll(found.getEngines());
|
||||
}
|
||||
} else {
|
||||
entities.add(found);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user