Difference between revisions of "SUNScholar/Search Indexes"

From Libopedia
Jump to navigation Jump to search
m
 
(106 intermediate revisions by the same user not shown)
Line 1: Line 1:
{{SUNScholar}}
 
 
 
<center>
 
<center>
<font color="red">
+
'''[[SUNScholar/Indexes|Back to Indexes]]'''
'''!!! WARNING !!!'''
 
 
 
'''https://jira.duraspace.org/browse/DS-1070'''
 
 
 
'''Not a good idea to enable Discovery in DSpace version 1.7.2'''
 
</font>
 
 
</center>
 
</center>
==Introduction==
+
==Instructions==
{{WARNING}}
+
===[[SUNScholar/Discovery/5.X|For DSpace 5.X]]===
 +
===[[SUNScholar/Discovery/4.X|For DSpace 4.X]]===
  
<font color="red">'''Before attempting SOLR discovery setup please make sure the following are correct:'''</font>
 
#[[SUNScholar/Prepare_Ubuntu/S05#Step_5.2.1:_Setup_.22authbind.22_for_Tomcat|Tomcat is listening on TCP port 80.]]
 
#[[SUNScholar/Install_Dspace/S08|The SOLR webapp is correctly published.]]
 
  
==Step 1==
+
==<font color="red">'''PLEASE NOTE:'''</font>==
Edit the solr search URL in the discovery service setup file.
+
*https://jira.duraspace.org/browse/DS-2482
nano /home/dspace/dspace-1.8.2-src-release/dspace/config/modules/discovery.cfg
+
*https://jira.duraspace.org/browse/DS-2809
Make sure the solr URL is as follows by removing port 8080. See example below.
 
<pre>
 
#---------------------------------------------------------------#
 
#-----------------DISCOVERY CONFIGURATIONS----------------------#
 
#---------------------------------------------------------------#
 
# Configuration properties used solely by the Discovery        #
 
# faceted-search system.                                        #
 
#---------------------------------------------------------------#
 
##### Search Indexing #####
 
search.server = http://localhost/solr/search
 
  
#Char used to ensure that the sidebar facets are case insensitive
+
==Check Config==
#solr.facets.split.char=|||
+
To check your configuration, run the following:
 
+
$HOME/bin/dspace dsrun org.dspace.discovery.configuration.DiscoveryConfigurationService
#All metadata fields that will not end up in the index, this is a comma separated list
+
See below for an example output.
index.ignore=dc.description.provenance
+
<pre>
 +
79
 +
default
 +
Facets:
 +
advisor
 +
dc.contributor.advisor
 +
author
 +
dc.contributor.author
 +
dc.creator
 +
subject
 +
dc.subject.*
 +
dateIssued
 +
dc.date.issued
 +
Search filters
 +
dc.title
 +
dc.contributor.advisor
 +
dc.contributor.author
 +
dc.creator
 +
dc.subject.*
 +
dc.date.issued
 +
dc.type
 +
dc.description.provenance
 +
Recent submissions configuration:
 +
Metadata sort field: dc.date.accessioned
 +
Max recent submissions: 30
 +
site
 +
Facets:
 +
advisor
 +
dc.contributor.advisor
 +
author
 +
dc.contributor.author
 +
dc.creator
 +
subject
 +
dc.subject.*
 +
dateIssued
 +
dc.date.issued
 +
Search filters
 +
dc.title
 +
dc.contributor.advisor
 +
dc.contributor.author
 +
dc.creator
 +
dc.subject.*
 +
dc.date.issued
 +
dc.type
 +
dc.description.provenance
 +
Recent submissions configuration:
 +
Metadata sort field: dc.date.accessioned
 +
Max recent submissions: 30
 
</pre>
 
</pre>
{{NANO}}
 
  
==Step 2==
+
==References==
Please refer to the official DSpace documentation
+
*https://wiki.duraspace.org/display/DSDOC5x/Discovery
 +
*https://wiki.duraspace.org/display/DSDOC4x/Discovery
 
*https://wiki.duraspace.org/display/DSDOC3x/Discovery
 
*https://wiki.duraspace.org/display/DSDOC3x/Discovery
*https://wiki.duraspace.org/display/DSDOC18/Discovery
+
----
*https://wiki.duraspace.org/display/DSDOC17/Discovery
+
*https://github.com/DSpace/DSpace/blob/master/dspace/config/spring/api/discovery.xml
 
+
[[Category:Customisation]]
==Step 3==
 
Type the following to rebuild the discovery index.
 
/home/dspace/bin/dspace update-discovery-index -b
 
==Example Discovery Spring Config==
 
Below is an example file: '''/home/dspace/config/modules/spring/spring-dspace-addon-discover-configuration-services.xml'''.
 
<pre>
 
<?xml version="1.0" encoding="UTF-8"?>
 
<!--
 
 
 
    The contents of this file are subject to the license and copyright
 
    detailed in the LICENSE and NOTICE files at the root of the source
 
    tree and available online at
 
 
 
    http://www.dspace.org/license/
 
 
 
-->
 
<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">
 
 
 
    <context:annotation-config /> <!-- allows us to use spring annotations in beans -->
 
 
 
    <!--Bean that is used for mapping communities/collections to certain discovery configurations.-->
 
    <bean id="org.dspace.discovery.configuration.DiscoveryConfigurationService" class="org.dspace.discovery.configuration.DiscoveryConfigurationService">
 
        <property name="map">
 
            <map>
 
                <!--The map containing all the settings,
 
                    the key is used to refer to the page (the "site" or a community/collection handle)
 
                    the value-ref is a reference to an identifier of the DiscoveryConfiguration format
 
                    -->
 
                <!--The default entry, DO NOT REMOVE the system requires this-->
 
              <entry key="default" value-ref="defaultConfiguration" />
 
 
 
              <!--Use site to override the default configuration for the home page & default discovery page-->
 
              <!--<entry key="site" value-ref="defaultConfiguration" />-->
 
              <!--<entry key="123456789/7621" value-ref="defaultConfiguration"/>-->
 
            </map>
 
        </property>
 
    </bean>
 
 
 
    <!--The default configuration settings for discovery-->
 
    <bean id="defaultConfiguration" class="org.dspace.discovery.configuration.DiscoveryConfiguration" scope="prototype">
 
        <!--Which sidebar facets are to be displayed-->
 
        <property name="sidebarFacets">
 
            <list>
 
                <ref bean="sidebarFacetAdvisor" />
 
                <ref bean="sidebarFacetAuthor" />
 
                <ref bean="sidebarFacetSubject" />
 
                <ref bean="sidebarFacetDateIssued" />
 
            </list>
 
        </property>
 
        <!--The search filters which can be used on the discovery search page-->
 
        <property name="searchFilters">
 
            <list>
 
                <ref bean="searchFilterTitle" />
 
                <ref bean="searchFilterAdvisor" />
 
                <ref bean="searchFilterAuthor" />
 
                <ref bean="searchFilterSubject" />
 
                <ref bean="searchFilterIssued" />
 
                <ref bean="searchFilterType" />
 
                <ref bean="searchFilterProvenance" />
 
            </list>
 
        </property>
 
        <!--The sort filters for the discovery search-->
 
        <property name="searchSortConfiguration">
 
            <bean class="org.dspace.discovery.configuration.DiscoverySortConfiguration">
 
                <property name="defaultSort" ref="sortDateIssued"/>
 
                <!--DefaultSortOrder can either be desc or asc (desc is default)-->
 
                <property name="defaultSortOrder" value="desc"/>
 
                <property name="sortFields">
 
                    <list>
 
                        <ref bean="sortTitle" />
 
                        <ref bean="sortDateIssued" />
 
                    </list>
 
                </property>
 
            </bean>
 
        </property>
 
        <!--Any default filter queries, these filter queries will be used for all queries done by discovery for this configuration-->
 
        <!--<property name="defaultFilterQueries">-->
 
            <!--<list>-->
 
                <!--Only find items-->
 
                <!--<value>search.resourcetype:2</value>-->
 
            <!--</list>-->
 
        <!--</property>-->
 
        <!--The configuration for the recent submissions-->
 
        <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="15"/>
 
            </bean>
 
        </property>
 
    </bean>
 
 
 
 
 
 
 
    <!--Search filter configuration beans-->
 
    <bean id="searchFilterTitle" class="org.dspace.discovery.configuration.DiscoverySearchFilter">
 
        <property name="indexFieldName" value="title"/>
 
        <property name="metadataFields">
 
            <list>
 
                <value>dc.title</value>
 
            </list>
 
        </property>
 
        <property name="fullAutoComplete" value="false"/>
 
    </bean>
 
 
 
    <bean id="searchFilterAdvisor" class="org.dspace.discovery.configuration.DiscoverySearchFilter">
 
        <property name="indexFieldName" value="advisor"/>
 
        <property name="metadataFields">
 
            <list>
 
                <value>dc.contributor.advisor</value>
 
            </list>
 
        </property>
 
        <property name="fullAutoComplete" value="true"/>
 
    </bean>
 
 
 
    <bean id="searchFilterAuthor" class="org.dspace.discovery.configuration.DiscoverySearchFilter">
 
        <property name="indexFieldName" value="author"/>
 
        <property name="metadataFields">
 
            <list>
 
                <value>dc.contributor.author</value>
 
            </list>
 
        </property>
 
        <property name="fullAutoComplete" value="true"/>
 
    </bean>
 
 
 
    <bean id="searchFilterSubject" class="org.dspace.discovery.configuration.DiscoverySearchFilter">
 
        <property name="indexFieldName" value="subject"/>
 
        <property name="metadataFields">
 
            <list>
 
                <value>dc.subject.*</value>
 
            </list>
 
        </property>
 
        <property name="fullAutoComplete" value="true"/>
 
    </bean>
 
 
 
    <bean id="searchFilterIssued" class="org.dspace.discovery.configuration.DiscoverySearchFilter">
 
        <property name="indexFieldName" value="dateIssued"/>
 
        <property name="metadataFields">
 
            <list>
 
                <value>dc.date.issued</value>
 
            </list>
 
        </property>
 
        <property name="type" value="date"/>
 
        <property name="fullAutoComplete" value="false"/>
 
    </bean>
 
 
 
    <bean id="searchFilterType" class="org.dspace.discovery.configuration.DiscoverySearchFilter">
 
        <property name="indexFieldName" value="type"/>
 
        <property name="metadataFields">
 
            <list>
 
                <value>dc.type</value>
 
            </list>
 
        </property>
 
        <property name="fullAutoComplete" value="true"/>
 
    </bean>
 
 
 
    <bean id="searchFilterProvenance" class="org.dspace.discovery.configuration.DiscoverySearchFilter">
 
        <property name="indexFieldName" value="provenance"/>
 
        <property name="metadataFields">
 
            <list>
 
                <value>dc.description.provenance</value>
 
            </list>
 
        </property>
 
        <property name="fullAutoComplete" value="true"/>
 
    </bean>
 
 
 
    <!--Sidebar facet configuration beans-->
 
    <bean id="sidebarFacetAdvisor" class="org.dspace.discovery.configuration.SidebarFacetConfiguration">
 
        <property name="indexFieldName" value="advisor"/>
 
        <property name="metadataFields">
 
            <list>
 
                <value>dc.contributor.advisor</value>
 
            </list>
 
        </property>
 
        <property name="facetLimit" value="30"/>
 
        <property name="sortOrder" value="COUNT"/>
 
    </bean>
 
 
 
    <bean id="sidebarFacetAuthor" class="org.dspace.discovery.configuration.SidebarFacetConfiguration">
 
        <property name="indexFieldName" value="author"/>
 
        <property name="metadataFields">
 
            <list>
 
                <value>dc.contributor.author</value>
 
            </list>
 
        </property>
 
        <property name="facetLimit" value="30"/>
 
        <property name="sortOrder" value="COUNT"/>
 
    </bean>
 
 
 
    <bean id="sidebarFacetSubject" class="org.dspace.discovery.configuration.SidebarFacetConfiguration">
 
        <property name="indexFieldName" value="subject"/>
 
        <property name="metadataFields">
 
            <list>
 
                <value>dc.subject.*</value>
 
            </list>
 
        </property>
 
        <property name="facetLimit" value="30"/>
 
        <property name="sortOrder" value="COUNT"/>
 
    </bean>
 
 
 
    <bean id="sidebarFacetDateIssued" class="org.dspace.discovery.configuration.SidebarFacetConfiguration">
 
        <property name="indexFieldName" value="dateIssued"/>
 
        <property name="metadataFields">
 
            <list>
 
                <value>dc.date.issued</value>
 
            </list>
 
        </property>
 
        <property name="type" value="date"/>
 
        <property name="sortOrder" value="VALUE"/>
 
    </bean>
 
 
 
 
 
    <!--Sort properties-->
 
    <bean id="sortTitle" class="org.dspace.discovery.configuration.DiscoverySortFieldConfiguration">
 
        <property name="metadataField" value="dc.title"/>
 
    </bean>
 
 
 
    <bean id="sortDateIssued" class="org.dspace.discovery.configuration.DiscoverySortFieldConfiguration">
 
        <property name="metadataField" value="dc.date.issued"/>
 
        <property name="type" value="date"/>
 
    </bean>
 
</beans>
 
</pre>
 
 
 
{{SOLR-WEBAPP}}
 
 
 
{{CONSOLE}}
 
 
 
'''[[SUNScholar/Indexes|Back to Indexes]]'''
 

Latest revision as of 19:27, 28 December 2016

Back to Indexes

Instructions

For DSpace 5.X

For DSpace 4.X

PLEASE NOTE:

Check Config

To check your configuration, run the following:

$HOME/bin/dspace dsrun org.dspace.discovery.configuration.DiscoveryConfigurationService

See below for an example output.

79
default
Facets:
	advisor
		dc.contributor.advisor
	author
		dc.contributor.author
		dc.creator
	subject
		dc.subject.*
	dateIssued
		dc.date.issued
Search filters
		dc.title
		dc.contributor.advisor
		dc.contributor.author
		dc.creator
		dc.subject.*
		dc.date.issued
		dc.type
		dc.description.provenance
Recent submissions configuration:
	Metadata sort field: dc.date.accessioned
	Max recent submissions: 30
site
Facets:
	advisor
		dc.contributor.advisor
	author
		dc.contributor.author
		dc.creator
	subject
		dc.subject.*
	dateIssued
		dc.date.issued
Search filters
		dc.title
		dc.contributor.advisor
		dc.contributor.author
		dc.creator
		dc.subject.*
		dc.date.issued
		dc.type
		dc.description.provenance
Recent submissions configuration:
	Metadata sort field: dc.date.accessioned
	Max recent submissions: 30

References