From 60d34e2f5718a746a2540af4ef897f9ea4470748 Mon Sep 17 00:00:00 2001 From: Eryk Kulikowski Date: Fri, 16 Jun 2023 16:17:41 +0200 Subject: [PATCH 1/3] restored missing side effect --- .../java/edu/harvard/iq/dataverse/DatasetPage.java | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/main/java/edu/harvard/iq/dataverse/DatasetPage.java b/src/main/java/edu/harvard/iq/dataverse/DatasetPage.java index cc270cb62d5..98169a831f4 100644 --- a/src/main/java/edu/harvard/iq/dataverse/DatasetPage.java +++ b/src/main/java/edu/harvard/iq/dataverse/DatasetPage.java @@ -684,12 +684,14 @@ public void showAll(){ private List selectFileMetadatasForDisplay() { final Set searchResultsIdSet; - if (StringUtil.isEmpty(fileLabelSearchTerm) && StringUtil.isEmpty(fileTypeFacet) && StringUtil.isEmpty(fileAccessFacet) && StringUtil.isEmpty(fileTagsFacet)) { - // But, if no search terms were specified, we return the full - // list of the files in the version: + if (isIndexedVersion() && StringUtil.isEmpty(fileLabelSearchTerm) && StringUtil.isEmpty(fileTypeFacet) && StringUtil.isEmpty(fileAccessFacet) && StringUtil.isEmpty(fileTagsFacet)) { + // Indexed version: we need facets, they are set as a side effect of getFileIdsInVersionFromSolr method. + // But, no search terms were specified, we will return the full + // list of the files in the version: we discard the getFileIdsInVersionFromSolr. + getFileIdsInVersionFromSolr(workingVersion.getId(), this.fileLabelSearchTerm); // Since the search results should include the full set of fmds if all the // terms/facets are empty, setting them to null should just be - // an optimization for the loop below + // an optimization to skip the loop below searchResultsIdSet = null; } else if (isIndexedVersion()) { // We run the search even if no search term and/or facets are From 1997a44f7ce5411507148ae20627cc747f3ec686 Mon Sep 17 00:00:00 2001 From: Eryk Kulikowski Date: Fri, 16 Jun 2023 16:20:42 +0200 Subject: [PATCH 2/3] improved comment --- src/main/java/edu/harvard/iq/dataverse/DatasetPage.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/edu/harvard/iq/dataverse/DatasetPage.java b/src/main/java/edu/harvard/iq/dataverse/DatasetPage.java index 98169a831f4..3d608153ba3 100644 --- a/src/main/java/edu/harvard/iq/dataverse/DatasetPage.java +++ b/src/main/java/edu/harvard/iq/dataverse/DatasetPage.java @@ -687,7 +687,7 @@ private List selectFileMetadatasForDisplay() { if (isIndexedVersion() && StringUtil.isEmpty(fileLabelSearchTerm) && StringUtil.isEmpty(fileTypeFacet) && StringUtil.isEmpty(fileAccessFacet) && StringUtil.isEmpty(fileTagsFacet)) { // Indexed version: we need facets, they are set as a side effect of getFileIdsInVersionFromSolr method. // But, no search terms were specified, we will return the full - // list of the files in the version: we discard the getFileIdsInVersionFromSolr. + // list of the files in the version: we discard the result from getFileIdsInVersionFromSolr. getFileIdsInVersionFromSolr(workingVersion.getId(), this.fileLabelSearchTerm); // Since the search results should include the full set of fmds if all the // terms/facets are empty, setting them to null should just be From 4f782d623eeeec1352a359e5d27d429bb0d50e27 Mon Sep 17 00:00:00 2001 From: Eryk Kulikowski Date: Fri, 16 Jun 2023 18:21:36 +0200 Subject: [PATCH 3/3] crawles should not follow the filter links --- src/main/webapp/filesFragment.xhtml | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/src/main/webapp/filesFragment.xhtml b/src/main/webapp/filesFragment.xhtml index 6122b86b274..99ab30fed68 100644 --- a/src/main/webapp/filesFragment.xhtml +++ b/src/main/webapp/filesFragment.xhtml @@ -144,7 +144,7 @@