Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ufal/publisher-ok-fix #473

Merged
merged 3 commits into from
Dec 14, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -984,6 +984,7 @@ public void discoverSearchTest() throws Exception {
SearchFilterMatcher.authorFilter(),
SearchFilterMatcher.subjectFilter(),
// SearchFilterMatcher.dateIssuedFilter(),
SearchFilterMatcher.publisherFilter(),
SearchFilterMatcher.hasContentInOriginalBundleFilter(),
SearchFilterMatcher.hasFileNameInOriginalBundleFilter(),
SearchFilterMatcher.hasFileDescriptionInOriginalBundleFilter(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -195,4 +195,15 @@ public static Matcher<? super Object> clarinItemsTypeFilter() {
checkOperators()
);
}

public static Matcher<? super Object> publisherFilter() {
return allOf(
hasJsonPath("$.filter", is("publisher")),
hasJsonPath("$.hasFacets", is(false)),
hasJsonPath("$.type", is("text")),
hasJsonPath("$.openByDefault", is(false)),
checkOperators()

);
}
}
12 changes: 12 additions & 0 deletions dspace/config/spring/api/discovery.xml
Original file line number Diff line number Diff line change
Expand Up @@ -200,6 +200,7 @@
<ref bean="searchFilterLanguage" />
<ref bean="searchFilterItemsCommunity"/>
<ref bean="searchFilterType"/>
<ref bean="searchFilterPublisher"/>
</list>
</property>
<!--The sort filters for the discovery search-->
Expand Down Expand Up @@ -2488,6 +2489,17 @@
<property name="sortOrderFilterPage" value="COUNT"/>
</bean>

<bean id="searchFilterPublisher" class="org.dspace.discovery.configuration.DiscoverySearchFilterFacet">
<property name="indexFieldName" value="publisher"/>
<property name="metadataFields">
<list>
<value>dc.publisher</value>
</list>
</property>
<property name="sortOrderSidebar" value="COUNT"/>
<property name="sortOrderFilterPage" value="COUNT"/>
</bean>

<bean id="searchFilterEntityType" class="org.dspace.discovery.configuration.DiscoverySearchFilterFacet">
<property name="indexFieldName" value="entityType"/>
<property name="metadataFields">
Expand Down
Loading