SUNScholar/Discovery/1.8.X

Back to Search Indexes

Step 1
Edit the solr search URL in the discovery service setup file. nano $HOME/ source /dspace/config/modules/discovery.cfg Make sure the solr URL is as follows by removing port 8080. See example below. search.server = http://localhost/solr/search
 * 1) -DISCOVERY CONFIGURATIONS--#
 * 2) Configuration properties used solely by the Discovery         #
 * 3) faceted-search system.                                        #
 * 4) Search Indexing #####
 * 1) faceted-search system.                                        #
 * 2) Search Indexing #####
 * 1) Search Indexing #####


 * 1) Char used to ensure that the sidebar facets are case insensitive
 * 2) solr.facets.split.char=|||

index.ignore=dc.description.provenance
 * 1) All metadata fields that will not end up in the index, this is a comma separated list

Step 2
Please refer to the official DSpace documentation to enable Discovery.
 * https://wiki.duraspace.org/display/DSDOC18/Discovery

Step 3
Type the following to rebuild the discovery index. $HOME/bin/dspace update-discovery-index -b

Step 4 - Custom Configuration (Optional)
Customise the discovery search facets by modifying the following file:

nano $HOME/ source /dspace/config/spring/discovery/spring-dspace-addon-discovery-configuration-services.xml


 * Remember to rebuild the index afterwards.

Author as "advisor" has been added and number of facets displayed has been amended to the example below. 

<beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:context="http://www.springframework.org/schema/context" xsi:schemaLocation="http://www.springframework.org/schema/beans          http://www.springframework.org/schema/beans/spring-beans-2.5.xsd           http://www.springframework.org/schema/context           http://www.springframework.org/schema/context/spring-context-2.5.xsd" default-autowire-candidates="*Service,*DAO,javax.sql.DataSource">



 

            <property name="max" value="15"/>

<bean id="searchFilterTitle" class="org.dspace.discovery.configuration.DiscoverySearchFilter"> <property name="indexFieldName" value="title"/> <property name="metadataFields"> dc.title <property name="fullAutoComplete" value="false"/>

<bean id="searchFilterAdvisor" class="org.dspace.discovery.configuration.DiscoverySearchFilter"> <property name="indexFieldName" value="advisor"/> <property name="metadataFields"> dc.contributor.advisor <property name="fullAutoComplete" value="true"/>

<bean id="searchFilterAuthor" class="org.dspace.discovery.configuration.DiscoverySearchFilter"> <property name="indexFieldName" value="author"/> <property name="metadataFields"> dc.contributor.author <property name="fullAutoComplete" value="true"/>

<bean id="searchFilterSubject" class="org.dspace.discovery.configuration.DiscoverySearchFilter"> <property name="indexFieldName" value="subject"/> <property name="metadataFields"> dc.subject.* <property name="fullAutoComplete" value="true"/>

<bean id="searchFilterIssued" class="org.dspace.discovery.configuration.DiscoverySearchFilter"> <property name="indexFieldName" value="dateIssued"/> <property name="metadataFields"> dc.date.issued <property name="type" value="date"/> <property name="fullAutoComplete" value="false"/>

<bean id="searchFilterType" class="org.dspace.discovery.configuration.DiscoverySearchFilter"> <property name="indexFieldName" value="type"/> <property name="metadataFields"> dc.type <property name="fullAutoComplete" value="true"/>

<bean id="searchFilterProvenance" class="org.dspace.discovery.configuration.DiscoverySearchFilter"> <property name="indexFieldName" value="provenance"/> <property name="metadataFields"> dc.description.provenance <property name="fullAutoComplete" value="true"/>

<bean id="sidebarFacetAdvisor" class="org.dspace.discovery.configuration.SidebarFacetConfiguration"> <property name="indexFieldName" value="advisor"/> <property name="metadataFields"> dc.contributor.advisor <property name="facetLimit" value="30"/> <property name="sortOrder" value="COUNT"/>

<bean id="sidebarFacetAuthor" class="org.dspace.discovery.configuration.SidebarFacetConfiguration"> <property name="indexFieldName" value="author"/> <property name="metadataFields"> dc.contributor.author <property name="facetLimit" value="30"/> <property name="sortOrder" value="COUNT"/>

<bean id="sidebarFacetSubject" class="org.dspace.discovery.configuration.SidebarFacetConfiguration"> <property name="indexFieldName" value="subject"/> <property name="metadataFields"> dc.subject.* <property name="facetLimit" value="30"/> <property name="sortOrder" value="COUNT"/>

<bean id="sidebarFacetDateIssued" class="org.dspace.discovery.configuration.SidebarFacetConfiguration"> <property name="indexFieldName" value="dateIssued"/> <property name="metadataFields"> dc.date.issued <property name="type" value="date"/> <property name="sortOrder" value="VALUE"/>

<bean id="sortTitle" class="org.dspace.discovery.configuration.DiscoverySortFieldConfiguration"> <property name="metadataField" value="dc.title"/>

<bean id="sortDateIssued" class="org.dspace.discovery.configuration.DiscoverySortFieldConfiguration"> <property name="metadataField" value="dc.date.issued"/> <property name="type" value="date"/>

Step 5 - Update messages.xml file with custom texts (Optional, see step 4 above)
It may be required to update the messages.xml file with any new indexes defined. See example below.

Add the following to the bottom of the file. Also see: Language modification