1
0
Fork 0

[graph provision] person serialisation, limit the number of authorships and coauthorships before expanding the payloads

This commit is contained in:
Claudio Atzori 2024-09-24 14:54:34 +02:00
parent d1cadc77c9
commit 4f0463d779
1 changed files with 2 additions and 2 deletions

View File

@ -160,12 +160,12 @@ public class PayloadConverterJob {
je.getLinks().forEach(link -> {
final String relClass = link.getRelation().getRelClass();
final Long count = freqs.getOrDefault(relClass, Long.MAX_VALUE);
final Long count = freqs.getOrDefault(relClass, 0L);
final Long max = MAX_RELATIONS_BY_RELCLASS.getOrDefault(relClass, Long.MAX_VALUE);
if (count <= max) {
rew.add(link);
freqs.put(relClass, freqs.get(relClass) + 1);
freqs.put(relClass, freqs.getOrDefault(relClass, 0L) + 1);
}
});
je.setLinks(rew);