Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit faa6f63

Browse files
author
Luke Sikina
committedJul 18, 2024
order
1 parent 34bd7a9 commit faa6f63

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed
 

‎src/main/java/edu/harvard/dbmi/avillach/dictionary/facet/FacetCategoryExtractor.java

+4-1
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,10 @@ public List<FacetCategory> extractData(ResultSet rs) throws SQLException, DataAc
3333
// group facets by category, then add them to their respective category
3434
Map<String, List<Facet>> grouped = facets.stream().collect(Collectors.groupingBy(Facet::category));
3535
return categories.entrySet().stream()
36-
.map(e -> new FacetCategory(e.getValue(), grouped.getOrDefault(e.getKey(), List.of())))
36+
.map(e -> new FacetCategory(
37+
e.getValue(),
38+
grouped.getOrDefault(e.getKey(), List.of()).stream().sorted(Comparator.comparingInt(Facet::count)).toList()
39+
))
3740
.toList();
3841
}
3942
}

0 commit comments

Comments
 (0)
Please sign in to comment.