From 6a64c6d45972fef76e94bf89430f3a8dd9b729cf Mon Sep 17 00:00:00 2001 From: Stephen Kraffmiller Date: Wed, 4 Jun 2025 16:11:47 -0400 Subject: [PATCH] #11542 get all type counts after first page --- src/main/java/edu/harvard/iq/dataverse/api/Search.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/main/java/edu/harvard/iq/dataverse/api/Search.java b/src/main/java/edu/harvard/iq/dataverse/api/Search.java index 7a2f09d821a..3aeb75c3b6a 100644 --- a/src/main/java/edu/harvard/iq/dataverse/api/Search.java +++ b/src/main/java/edu/harvard/iq/dataverse/api/Search.java @@ -114,8 +114,9 @@ public Response search( if (!types.isEmpty()) { // Query to get the totals if needed. // Only needed if the list of types doesn't include all types since missing types will default to count of 0 - // Only get the totals for the first page (paginationStart == 0) for speed - if (showTypeCounts && types.size() < objectTypeCountsMap.size() && paginationStart == 0) { + // Only get the totals for the first page (paginationStart == 0) for speed removing paginationStart == 0 for 11542 SEK 06/04/25 + // how slow is it to leave pagination start == 0 out? SEK 06/04/2025? ref11542 + if (showTypeCounts && types.size() < objectTypeCountsMap.size()) { List totalFilterQueries = new ArrayList<>(); totalFilterQueries.addAll(filterQueries); totalFilterQueries.add(SearchFields.TYPE + allTypes);