RED-3774: Always prefer entities over recommendactions
This commit is contained in:
parent
5d8f44d55d
commit
ecf794ff37
@ -223,6 +223,13 @@ public class EntitySearchUtils {
|
||||
|
||||
if (existing.getType().equals(found.getType())) {
|
||||
existing.getEngines().addAll(found.getEngines());
|
||||
if(existing.getEntityType().equals(EntityType.RECOMMENDATION) && found.getEntityType().equals(EntityType.ENTITY)
|
||||
|| existing.getEntityType().equals(EntityType.ENTITY) && found.getEntityType().equals(EntityType.RECOMMENDATION)){
|
||||
existing.setEntityType(EntityType.ENTITY);
|
||||
if(found.isRedaction()){
|
||||
existing.setRedaction(true);
|
||||
}
|
||||
}
|
||||
} else if (dictionary.getDictionaryRank(existing.getType()) <= dictionary.getDictionaryRank(found.getType())) {
|
||||
entities.remove(found);
|
||||
entities.add(found);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user