This is the codeAbility Sharing Platform! Learn more about the codeAbility Sharing Platform.

Skip to content
Snippets Groups Projects
Commit 35e14bcb authored by Michael Breu's avatar Michael Breu 💬
Browse files

Minor fix sum->max

parent af62b573
2 merge requests!17Initial Merge to Prepare Release 1.0.0,!1Resolve "Metadaten konsolideren"
......@@ -161,7 +161,7 @@ public class MetaDataRepository {
final Map<String, Integer> combinedHits = filteredEntries // s = String -> bool -> Stream<Entry<String,
// Map<String, Integer>>
.flatMap(e -> e.getValue().entrySet().stream()) // Stream< Map<String, Integer>> with duplicates
.collect(Collectors.toMap(Map.Entry::getKey, Map.Entry::getValue, Integer::sum));
.collect(Collectors.toMap(Map.Entry::getKey, Map.Entry::getValue, Integer::max));
return combinedHits.entrySet().stream().sorted((e1, e2) -> e2.getValue() - e1.getValue())
.limit(MAX_AUTO_COMPLETION_RESULTS).map(s -> new AutoCompleteEntry(s.getKey(), s.getValue())).collect(Collectors.toList()); // Map.Entry<String,
// Map<String,
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment