Difference between revisions of "SUNScholar/Browse Indexes/3.X"

From Libopedia
Jump to navigation Jump to search
m
 
(39 intermediate revisions by the same user not shown)
Line 2: Line 2:
 
  '''[[SUNScholar/Browse Indexes|Back to Browse Indexes]]'''
 
  '''[[SUNScholar/Browse Indexes|Back to Browse Indexes]]'''
 
</center>
 
</center>
 
==<font color="red">'''WARNING: Remove old database browse tables if using SOLR as DAO after an [[SUNScholar/Upgrading/DSpace/Release_Notes/3.2|upgrade from 1.8.2 to 3.2]]'''</font>==
 
===Remove "communities2item" table===
 
Login into the server as the '''dspace''' user and then type the following;
 
sudo -i
 
 
su - postgres
 
 
psql dspace
 
 
DELETE from communities2item;
 
 
\q
 
 
exit
 
 
exit
 
 
exit
 
===Remove all "bi_" tables===
 
I used pgadmin to do a cascade drop of all the bi_* tables, where bi = browse index.
 
 
See the notes link above to view the bug report.
 
 
Check that you have a backup of the database before doing this. '''You have been warned.'''
 
  
 
==Introduction==
 
==Introduction==
Line 40: Line 15:
 
==Step 1 - Select DAO (Data Access Objects) Engine==
 
==Step 1 - Select DAO (Data Access Objects) Engine==
 
Edit the '''dspace.cfg''' file and select the DAO engine by typing as follows:
 
Edit the '''dspace.cfg''' file and select the DAO engine by typing as follows:
  nano /home/dspace/<u>[[SUNScholar/Install_DSpace/S03#Step_3.2|source]]</u>/dspace/config/dspace.cfg
+
  nano $HOME/{{Source}}/dspace/config/dspace.cfg
 
Select SOLR DAO engine as per example below:
 
Select SOLR DAO engine as per example below:
  
;<big><font color="red">For SOLR you need to first have the "[[SUNScholar/SOLR Discovery|SOLR Discovery]]" function enabled. Which should be enabled by default with DSpace versions => 3.2</font></big>
 
 
<pre>
 
<pre>
 
###### Browse Configuration ######
 
###### Browse Configuration ######
Line 64: Line 38:
 
</pre>
 
</pre>
  
==Step 2 - Setup custom indexes==
+
==Step 1 - Setup custom indexes==
Modify the following sections of the config file.
+
Modify the following sections of the "dspace.cfg" config file.
===Search Indexes===
+
===Simple and Advanced Search Indexes===
;Since DSpace => 3.2, the simple search and advanced search indexes are now delivered by the discovery SOLR indexer. See link below.
+
[[SUNScholar/Search_Indexes|Replaced by the "Discovery" search indexes.]]
http://wiki.lib.sun.ac.za/index.php/SUNScholar/SOLR_Discovery/3.2#Config_Sample
 
  
 
===Browse Indexes===
 
===Browse Indexes===
 
Go to line 1125 approx in the DSpace config file and modify as desired.
 
Go to line 1125 approx in the DSpace config file and modify as desired.
 
<pre>
 
<pre>
# webui.browse.index.<n> = <index name> : metadata : <schema prefix>.<element>[.<qualifier>|.*] : date | title | text : full | single #
+
# webui.browse.index.<n> = <index name> : metadata : (dc schema identifier) : (date | title | text) : (asc | desc)
 +
# webui.browse.index.<n> = <index name> : item : <sort option name> : (asc | desc)
 
### SUNScholar browse indexes ###
 
### SUNScholar browse indexes ###
webui.browse.index.1 = title:metadata:dc.title:title:full
+
webui.browse.index.1 = title:item:title:asc
 
webui.browse.index.2 = author:metadata:dc.contributor.author:text
 
webui.browse.index.2 = author:metadata:dc.contributor.author:text
 
webui.browse.index.3 = advisor:metadata:dc.contributor.advisor:text
 
webui.browse.index.3 = advisor:metadata:dc.contributor.advisor:text
webui.browse.index.4 = dateissued:metadata:dc.date.issued:date:full
+
webui.browse.index.4 = dateissued:metadata:dc.date.issued:date:desc
 
webui.browse.index.5 = subject:metadata:dc.subject.*:text
 
webui.browse.index.5 = subject:metadata:dc.subject.*:text
 
webui.browse.index.6 = type:metadata:dc.type:text
 
webui.browse.index.6 = type:metadata:dc.type:text
 
</pre>
 
</pre>
'''<option name> = <index name> as per "full" definition above.'''
+
'''<option name> = <index name> as per "item" definition above.'''
 
<pre>
 
<pre>
# webui.itemlist.sort-option.<n> = <option name> : <schema prefix>.<element>[.<qualifier>|.*] :  date | title | text : show | hide #
+
# webui.itemlist.sort-option.<n> = <option name> : (dc schema identifier) (date | title | text) : (show | hide)
 
### SUNScholar item lists ###
 
### SUNScholar item lists ###
 
webui.itemlist.sort-option.1 = title:dc.title:title  
 
webui.itemlist.sort-option.1 = title:dc.title:title  
webui.itemlist.sort-option.2 = dateissued:dc.date.issued:date  
+
webui.itemlist.sort-option.2 = dateissued:dc.date.issued:date
 +
webui.itemlist.sort-option.3 = dateaccessioned:dc.date.accessioned:date  
 
</pre>
 
</pre>
'''<u><font color="red">Please note: There are major differences between the default settings in the DSpace config file (dspace.cfg) and the DSpace help manuals.'''
 
 
'''See: [http://wiki.lib.sun.ac.za/images/8/82/Bi-config.pdf Browse index settings differences]</font></u>'''
 
 
 
===Author Listing Indexes===
 
===Author Listing Indexes===
 
Using "nano" modify the following section in the DSpace config file to suit your needs. The default as configured below is to list all contributors.
 
Using "nano" modify the following section in the DSpace config file to suit your needs. The default as configured below is to list all contributors.
Line 144: Line 115:
 
#webui.browse.link.1 = author:dc.contributor.author
 
#webui.browse.link.1 = author:dc.contributor.author
 
webui.browse.link.1 = author:dc.contributor.*
 
webui.browse.link.1 = author:dc.contributor.*
 +
</pre>
 +
 +
===Recent Submissions Sort===
 +
<pre>
 +
#### Additional configuration for Recent Submissions code ####
 +
 +
# the sort option name (from webui.itemlist.sort-option above) to use for
 +
# displaying recent submissions.  (this
 +
# is used by the Recent Submissions system and any other time based
 +
# browse query such as FeedServlet)
 +
#
 +
recent.submissions.sort-option = dateaccessioned
 
</pre>
 
</pre>
  
 
==Step 3 - Update messages.xml file==
 
==Step 3 - Update messages.xml file==
Add the following to the bottom of the file. '''Also see: [[SUNScholar/Theme/Language|Language modification]]'''
+
Because we introduced new search and browse indexes above, we need to update the language file to present human readable messages for these new indexes.
 +
 
 +
Edit the following file:
 +
nano $HOME/{{Source}}/dspace-xmlui/src/main/webapp/i18n/messages.xml
 +
 
 +
Add the following to the bottom of the file before the closing <tt>'''</catalogue>'''</tt> tag.
 
{{MESSAGES}}
 
{{MESSAGES}}
  
==Step 4 - [[SUNScholar/Rebuild_DSpace|Rebuild DSpace]]==
+
==[[SUNScholar/Restart_DSpace|Step 4 - Restart DSpace]]==
Click on the heading above, then return here.
 
 
 
==Step 5 - [[SUNScholar/Indexes/Rebuild|Rebuild search and browse indexes]]==
 
Click on the heading above, then return here
 
  
==References==
+
==[[SUNScholar/Indexes/Rebuild|Step 5 - Rebuild Indexes]]==
*https://jira.duraspace.org/browse/DS-1619
+
==[[SUNScholar/Daily_Admin|Step 6 - Do regular index maintenance]]==
*http://wiki.duraspace.org/display/DSDOC3X/Configuration#Configuration-BrowseIndexConfiguration
 

Latest revision as of 09:43, 2 June 2016

Back to Browse Indexes

Introduction

Starting with DSpace 3.2, the DAO engine can now be defined to be one of the following:

  • PostgreSQL
  • Oracle
  • SOLR

Refer: https://wiki.duraspace.org/display/DSPACE/Refactoring+the+DSpace+Domain+Model

See step 1 below to determine which engine to use.

Step 1 - Select DAO (Data Access Objects) Engine

Edit the dspace.cfg file and select the DAO engine by typing as follows:

nano $HOME/source/dspace/config/dspace.cfg

Select SOLR DAO engine as per example below:

###### Browse Configuration ######
#
# Define the DAO class to use this must meet your storage choice for
# the browse system (RDBMS: PostgreSQL or Oracle, SOLR).
# By default the standard RDBMS implementation for your db is used
# 
# PostgreSQL:
# browseDAO.class = org.dspace.browse.BrowseDAOPostgres
# browseCreateDAO.class = org.dspace.browse.BrowseCreateDAOPostgres
# 
# Oracle:
# browseDAO.class = org.dspace.browse.BrowseDAOOracle
# browseCreateDAO.class = org.dspace.browse.BrowseCreateDAOOracle
#
# SOLR:
browseDAO.class = org.dspace.browse.SolrBrowseDAO
browseCreateDAO.class = org.dspace.browse.SolrBrowseCreateDAO

Step 1 - Setup custom indexes

Modify the following sections of the "dspace.cfg" config file.

Simple and Advanced Search Indexes

Replaced by the "Discovery" search indexes.

Browse Indexes

Go to line 1125 approx in the DSpace config file and modify as desired.

# webui.browse.index.<n> = <index name> : metadata : (dc schema identifier) : (date | title | text) : (asc | desc)
# webui.browse.index.<n> = <index name> : item : <sort option name> : (asc | desc)
### SUNScholar browse indexes ###
webui.browse.index.1 = title:item:title:asc
webui.browse.index.2 = author:metadata:dc.contributor.author:text
webui.browse.index.3 = advisor:metadata:dc.contributor.advisor:text
webui.browse.index.4 = dateissued:metadata:dc.date.issued:date:desc
webui.browse.index.5 = subject:metadata:dc.subject.*:text
webui.browse.index.6 = type:metadata:dc.type:text

<option name> = <index name> as per "item" definition above.

# webui.itemlist.sort-option.<n> = <option name> : (dc schema identifier) :  (date | title | text) : (show | hide)
### SUNScholar item lists ###
webui.itemlist.sort-option.1 = title:dc.title:title 
webui.itemlist.sort-option.2 = dateissued:dc.date.issued:date
webui.itemlist.sort-option.3 = dateaccessioned:dc.date.accessioned:date 

Author Listing Indexes

Using "nano" modify the following section in the DSpace config file to suit your needs. The default as configured below is to list all contributors.

## Set the options for how authors are displayed in the browse listing

# Define which field is the author/editor etc listing.  This should be
listed in the
# field webui.itemlist.columns, otherwise it will have no effect.
# This cannot be a field already marked out as a title or a date, as this
# will also have no effect.  This is used in conjunction with the
# webui.browse.author-limit field below, to truncate author lists.  For
# configuring links to author publication lists use webui.browse.link below.
# (This setting is not used by the XMLUI as it is controlled by your theme)
#
#webui.browse.author-field = dc.contributor.author
webui.browse.author-field = dc.contributor.*

# define how many authors to display before truncating and completing with
"et al"
# (or language pack specific alternative)
#
# Use -1 for unlimited (which is what will be used if this option
# is omitted)
#
# webui.browse.author-limit = 3

# which fields should link to other browse listings.  This should associated
# the name of one of the above browse indices with a metadata field listed
# in <webui.itemlist.columns> above.  The form is:
#
# webui.browse.link.<n> = <index name>:<display column metadata>
#
# Note that cross linking will only work for fields other than title.
#
# The effect this has is to create links to browse views for the item
clicked on.
# If it is a "single" type, it will link to a view of all the items which
share
# that metadata element in common (i.e. all the papers by a single author).
 If
# it is a "full" type, it will link to a view of the standard full browse
page,
# starting with the value of the link clicked on.
# (This setting is not used by the XMLUI, as links are controlled by your
theme)
#
# The default below defines the authors to link to other publications by
that author
#
#webui.browse.link.1 = author:dc.contributor.author
webui.browse.link.1 = author:dc.contributor.*

Recent Submissions Sort

#### Additional configuration for Recent Submissions code ####

# the sort option name (from webui.itemlist.sort-option above) to use for
# displaying recent submissions.  (this
# is used by the Recent Submissions system and any other time based
# browse query such as FeedServlet)
#
recent.submissions.sort-option = dateaccessioned

Step 3 - Update messages.xml file

Because we introduced new search and browse indexes above, we need to update the language file to present human readable messages for these new indexes.

Edit the following file:

nano $HOME/source/dspace-xmlui/src/main/webapp/i18n/messages.xml

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

<!-- Added by H Gibson -->

       <!-- Title Messages -->
        <message key="xmlui.ArtifactBrowser.ConfigurableBrowse.title.column_heading">Title</message>
        <message key="xmlui.ArtifactBrowser.ConfigurableBrowse.title.metadata.title">Browsing by Title</message>
	<message key="xmlui.ArtifactBrowser.ConfigurableBrowse.trail.metadata.title">Browsing by Title</message>
	<message key="xmlui.ArtifactBrowser.ConfigurableBrowse.sort_by.title">title</message>
	<message key="xmlui.ArtifactBrowser.AbstractSearch.sort_by.title">title</message>

       <!-- Author Messages -->
        <message key="xmlui.ArtifactBrowser.ConfigurableBrowse.author.column_heading">Author</message>
	<message key="xmlui.ArtifactBrowser.ConfigurableBrowse.title.metadata.author">Author</message>
	<message key="xmlui.ArtifactBrowser.ConfigurableBrowse.trail.metadata.author">Browsing by Author</message>
	<message key="xmlui.ArtifactBrowser.ConfigurableBrowse.sort_by.author">author</message>
	<message key="xmlui.ArtifactBrowser.AbstractSearch.sort_by.author">author</message>

       <!-- Advisor Messages -->
        <message key="xmlui.ArtifactBrowser.ConfigurableBrowse.advisor.column_heading">Advisor</message>
	<message key="xmlui.ArtifactBrowser.ConfigurableBrowse.title.metadata.advisor">Advisor</message>
	<message key="xmlui.ArtifactBrowser.ConfigurableBrowse.trail.metadata.advisor">Browsing by Advisor</message>
	<message key="xmlui.ArtifactBrowser.ConfigurableBrowse.sort_by.advisor">advisor</message>
	<message key="xmlui.ArtifactBrowser.AbstractSearch.sort_by.advisor">advisor</message>
        <message key="xmlui.ArtifactBrowser.Navigation.browse_advisor">By Advisor</message>
        <message key="xmlui.ArtifactBrowser.SimpleSearch.filter.dc.contributor.advisor">Advisor</message>
        <message key="xmlui.ArtifactBrowser.SimpleSearch.filter.advisor">Advisor</message>

       <!-- Issue Date Messages -->
        <message key="xmlui.ArtifactBrowser.ConfigurableBrowse.dateissued.column_heading">Issue Date</message>
        <message key="xmlui.ArtifactBrowser.ConfigurableBrowse.title.metadata.dateissued">Browsing by Issue Date</message>
	<message key="xmlui.ArtifactBrowser.ConfigurableBrowse.trail.metadata.dateissued">Browsing by Issue Date</message>
	<message key="xmlui.ArtifactBrowser.ConfigurableBrowse.sort_by.issuedate">issuedate</message>
	<message key="xmlui.ArtifactBrowser.AbstractSearch.sort_by.issuedate">issuedate</message>
	<message key="xmlui.ArtifactBrowser.AdvancedSearch.type_date">Date</message>
	<message key="xmlui.ArtifactBrowser.AdvancedSearch.type_issuedate">Issue Date</message>

       <!-- Subject Messages -->
	<message key="xmlui.ArtifactBrowser.ConfigurableBrowse.title.metadata.subject">Subject</message>
	<message key="xmlui.ArtifactBrowser.ConfigurableBrowse.trail.metadata.subject">Browsing by Subject</message>
	<message key="xmlui.ArtifactBrowser.ConfigurableBrowse.sort_by.subject">subject</message>
	<message key="xmlui.ArtifactBrowser.AbstractSearch.sort_by.subject">subject</message>

       <!-- Type Messages -->
	<message key="xmlui.ArtifactBrowser.ConfigurableBrowse.type.column_heading">Type</message>
	<message key="xmlui.ArtifactBrowser.ConfigurableBrowse.title.metadata.type">Type</message>
	<message key="xmlui.ArtifactBrowser.ConfigurableBrowse.trail.metadata.type">Browsing by Type</message>
	<message key="xmlui.ArtifactBrowser.ConfigurableBrowse.sort_by.type">type</message>
	<message key="xmlui.ArtifactBrowser.AbstractSearch.sort_by.type">type</message>
        <message key="xmlui.ArtifactBrowser.Navigation.browse_type">By Type</message>
	<message key="xmlui.ArtifactBrowser.AdvancedSearch.type_type">Type</message>	
	<message key="xmlui.ArtifactBrowser.SimpleSearch.filter.dc.type">Type</message>
	<message key="xmlui.ArtifactBrowser.SimpleSearch.filter.type">Type</message>
	<message key="xmlui.ArtifactBrowser.SimpleSearch.filter.type_filter">Type</message>

       <!-- Provenance Messages -->
	<message key="xmlui.ArtifactBrowser.AdvancedSearch.type_provenance">Provenance</message>
	<message key="xmlui.ArtifactBrowser.SimpleSearch.filter.dc.description.provenance">Provenance</message>
	<message key="xmlui.ArtifactBrowser.SimpleSearch.filter.provenance">Provenance</message>
	<message key="xmlui.ArtifactBrowser.SimpleSearch.filter.provenance_filter">Provenance</message>

Step 4 - Restart DSpace

Step 5 - Rebuild Indexes

Step 6 - Do regular index maintenance