Page History
...
- metadataField (Required): The metadata field indicating the sort valuesdefaultSort (Optional): A boolean indicating which sort filter should be the default one.
- type (optional): the type of the sort option can either be date or text, if none is defined text will be used.
DiscoveryConfiguration Customization
The DiscoveryConfiguration Groups configurations for sidebar facets, search filters, search sort options and recent submissions. If you want to show the same sidebar facets, use the same search filters, search options and recent submissions everywhere in your repository, you will only need one DiscoveryConfiguration and you might as well just edit the defaultConfiguration.
The DiscoveryConfiguration makes it very easy to use custom sidebar facets, search filters, ... on specific communities or collection homepage. This is particularly useful if your collections are heterogeneous. For example, in a collection with conference papers, you might want to offer a sidebar facet for conference date, which might be more relevant than the actual issued date of the proceedings. In a collection with papers, you might want to offer a facet for funding bodies or publisher, while these fields are irrelevant for items like learning objects.
A DiscoveryConfiguration consists out of five parts
- The list of applicable sidebarFacets
- The list of applicable searchFilters
- The list of applicable searchSortFields
- Any default filter queries (optional)
- The configuration for the Recent submissions display
Configuring lists of sidebarFacets, searchFilters and searchSortFields
Below is an example of how one of these lists can be configured. It's important that each of the bean references corresponds with the exact name of the earlier defined Facets, filters or sort options.
Code Block | ||
---|---|---|
| ||
<property name="sidebarFacets">
<list>
<ref bean="sidebarFacetAuthor" />
<ref bean="sidebarFacetSubject" />
<ref bean="sidebarFacetDateIssued" />
</list>
</property> |
Adding default filter queries (OPTIONAL)
Default filter queries are applied on all search operations & sidebarfacet clicks. One useful application of default filter queries is ensuring that all returned results are items. As a result, subcommunities and collections that are returned as results of the search operation, are filtered out.
Similar to the lists above, the default filter queries are defined as a list. They are optional.
Code Block | ||
---|---|---|
| ||
<property name="defaultFilterQueries">
<list>
<value>query1</value>
<value>query2</value>
</list>
</property> |
This property contains a simple list which in turn contains the queries. Some examples of possible queries:
- search.resourcetype:2
- dc.subject:test
- dc.contributor.author: "Van de Velde, Kevin"
- ...
Customizing the Recent Submissions display
The recent submissions configuration element contains all the configuration settings to display the list of recently submitted items on the home page or community/collection page. Because the recent submission configuration is in the discovery configuration block, it is possible to show 10 recently submitted items on the home page but 5 on the community/collection pages.
Below is an example configuration of the recent submissions.
Code Block | ||
---|---|---|
| ||
<property name="recentSubmissionConfiguration">
<bean class="org.dspace.discovery.configuration.DiscoveryRecentSubmissionsConfiguration">
<property name="metadataSortField" value="dc.date.accessioned"/>
<property name="type" value="date"/>
<property name="max" value="5"/>
</bean>
</property>
|
The property name & the bean class are mandatory. The property field names are discusses below.
- metadataSortField (mandatory): The metadata field to sort on to retrieve the recent submissions
- max (mandatory): The maximum number of results to be displayed as recent submissions
- type (optional): the type of the sort option search filter it can either be date or text, if none is defined text will be used.
...