RED-2224: Fixed overriding entries with higher rank

This commit is contained in:
Dominique Eifländer 2021-10-19 15:32:20 +02:00
parent 46c6385d11
commit 634eee1716

View File

@ -219,8 +219,8 @@ public class EntityRedactionService {
if (!local) {
Map<String, Set<String>> nerValuesPerType = getNerValues(sectionNumber, nerEntities, cellstarts);
nerValuesPerType.entrySet().forEach(entry -> {
EntitySearchUtils.addOrAddEngine(found, EntitySearchUtils.find(searchableString, entry.getValue(), entry
.getKey(), headline, sectionNumber, false, false, Engine.NER));
EntitySearchUtils.addEntitiesWithHigherRank(found, EntitySearchUtils.find(searchableString, entry.getValue(), entry
.getKey(), headline, sectionNumber, false, false, Engine.NER), dictionary);
});
}