SUNScholar/Discovery/3.X

Back to Search Indexes

Step 1 - Define Discovery SOLR service
Edit the solr search URL in the discovery service setup file. nano $HOME//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=\n|||\n

index.projection=dc.title,dc.contributor.*,dc.date.issued
 * 1) index.ignore-variants = false
 * 2) index.ignore-authority = false


 * 1) ONLY-FOR-JSPUI:
 * 2) 1) you need to set the DiscoverySearchRequestProcessor in the dspace.cfg
 * 3) 2) to show facet on Site/Community/etc. you need to add a Site/Community/Collection
 * 4) 	 Processors plugin in the dspace.cfg

Step 2 - Enable Discovery in XMLUI
Enable discovery by following: https://wiki.duraspace.org/display/DSDOC3x/Discovery#Discovery-StepsrequiredforXMLUI

Step 3 - Discovery Configuration
Edit the following file: nano $HOME//dspace/config/spring/api/discovery.xml

 Please note: All the sidebar facets MUST be a part of the search filters list 

In the customised example below, "Advisor", "Type" and "Provenance" search fields have been added and "Provenance" has been removed from ignored metadata fields. 

<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" xmlns:util="http://www.springframework.org/schema/util" xsi:schemaLocation="http://www.springframework.org/schema/beans          http://www.springframework.org/schema/beans/spring-beans-3.0.xsd           http://www.springframework.org/schema/context           http://www.springframework.org/schema/context/spring-context-3.0.xsd           http://www.springframework.org/schema/util           http://www.springframework.org/schema/util/spring-util-3.0.xsd" default-autowire-candidates="*Service,*DAO,javax.sql.DataSource">









 

  dc.rights  dc.rights <util:constant static-field="org.dspace.core.Constants.ITEM"/>

<bean id="defaultConfiguration" class="org.dspace.discovery.configuration.DiscoveryConfiguration" scope="prototype"> <property name="sidebarFacets"> <property name="searchFilters"> <property name="searchSortConfiguration"> <bean class="org.dspace.discovery.configuration.DiscoverySortConfiguration"> <property name="defaultSortOrder" value="desc"/> <property name="sortFields"> <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="20"/> <property name="defaultRpp" value="20" /> <property name="hitHighlightingConfiguration"> <bean class="org.dspace.discovery.configuration.DiscoveryHitHighlightingConfiguration"> <property name="metadataFields"> <bean class="org.dspace.discovery.configuration.DiscoveryHitHighlightFieldConfiguration"> <property name="field" value="dc.title"/> <property name="snippets" value="5"/> <bean class="org.dspace.discovery.configuration.DiscoveryHitHighlightFieldConfiguration"> <property name="field" value="dc.contributor.author"/> <property name="snippets" value="5"/> <bean class="org.dspace.discovery.configuration.DiscoveryHitHighlightFieldConfiguration"> <property name="field" value="dc.contributor.advisor"/> <property name="snippets" value="5"/> <bean class="org.dspace.discovery.configuration.DiscoveryHitHighlightFieldConfiguration"> <property name="field" value="dc.description.abstract"/> <property name="maxSize" value="250"/> <property name="snippets" value="2"/> <bean class="org.dspace.discovery.configuration.DiscoveryHitHighlightFieldConfiguration"> <property name="field" value="fulltext"/> <property name="maxSize" value="250"/> <property name="snippets" value="2"/> <property name="moreLikeThisConfiguration"> <bean class="org.dspace.discovery.configuration.DiscoveryMoreLikeThisConfiguration"> <property name="similarityMetadataFields"> dc.title dc.contributor.author dc.contributor.advisor dc.creator dc.subject <property name="minTermFrequency" value="5"/> <property name="max" value="3"/> <property name="minWordLength" value="5"/>

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

<bean id="searchFilterAuthor" class="org.dspace.discovery.configuration.DiscoverySearchFilterFacet"> <property name="indexFieldName" value="author"/> <property name="metadataFields"> dc.contributor.author dc.creator <property name="facetLimit" value="20"/> <property name="sortOrder" value="COUNT"/>

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

<bean id="searchFilterSubject" class="org.dspace.discovery.configuration.HierarchicalSidebarFacetConfiguration"> <property name="indexFieldName" value="subject"/> <property name="metadataFields"> dc.subject.* <property name="facetLimit" value="20"/> <property name="sortOrder" value="COUNT"/> <property name="splitter" value="::"/>

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

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

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

<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 4 - Update localised messages.xml file
Because we introduced new discovery indexes above, we need to update the language file to present human readable messages for these new indexes.

Edit the following file: nano $HOME//dspace-xmlui/src/main/webapp/i18n/messages.xml

Add the following to the bottom of the file before the closing  </tt> tag.

Also see: Language modification

Step 6 - Rebuild Indexes
 Remember:  Clear the XMLUI cache when logged in as an administrator, after rebuilding the discovery indexes..