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

From Libopedia
Jump to navigation Jump to search
(Created page with "{{SUNScholar}} ==Introduction== {{WARNING}} ==Step 1 - Modify DSpace config== Below are instructions to setup the default browse and search indexes in DSpace using the Postg...")
 
Line 153: Line 153:
  
 
  '''[[SUNScholar/Customisation|Back to Customisation]]'''
 
  '''[[SUNScholar/Customisation|Back to Customisation]]'''
 +
 +
'''[[SUNScholar/Browse Indexes|Back to Browse Indexes]]'''

Revision as of 11:00, 13 December 2013

Template:SUNScholar

Introduction

This wiki help page assumes that you have used the three system setup procedures to install an Ubuntu server with DSpace software.

Step 1 - Modify DSpace config

Below are instructions to setup the default browse and search indexes in DSpace using the PostgreSQL DB.

Modify the following sections of the config file.

Search Indexes

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

##### Fields to Index for Search #####
# DC metadata elements.qualifiers to be indexed for search. #
# format: - search.index.[number] = [search field]:element.qualifier - * used as wildcard #
### SUNScholar search indexes ###
search.index.1 = title:dc.title.*
search.index.2 = author:dc.contributor.author
search.index.3 = advisor:dc.contributor.advisor
search.index.4 = issuedate:dc.date.issued
search.index.5 = keyword:dc.subject.*
search.index.6 = type:dc.type
search.index.7 = provenance:dc.description.provenance

Browse Indexes

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

# webui.browse.index.<n> = <index name> : metadata :  <schema prefix>.<element>[.<qualifier>|.*] :  date | title | text : full | single #
### SUNScholar browse indexes ###
webui.browse.index.1 = title:metadata:dc.title:title:full
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:full
webui.browse.index.5 = subject:metadata:dc.subject.*:text
webui.browse.index.6 = type:metadata:dc.type:text

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

# webui.itemlist.sort-option.<n> = <option name> :  <schema prefix>.<element>[.<qualifier>|.*] :  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 

Please note: There are major differences between the default settings in the DSpace config file (dspace.cfg) and the DSpace help manuals.

See: Browse index settings differences

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.*

Update messages.xml file

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

<!-- 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 2 - Rebuild DSpace

Go to the following link, then rebuild DSpace and return here.

http://wiki.lib.sun.ac.za/index.php/SUNScholar/Rebuild_DSpace

Step 3 - Rebuild search and browse indexes

Create a scripts folder.

mkdir /home/dspace/scripts

Edit the script.

nano /home/dspace/scripts/build-indexes

Copy and paste the following.

#!/bin/bash

# Stop the tomcat server
echo "Stopping the tomcat server... Please wait"
sudo /etc/init.d/tomcat6 stop

# Build new index
echo "Building new search and browse indexes... Please wait"
/home/dspace/bin/dspace index-init

# Start the tomcat server
echo "Starting the tomcat server... Please wait"
sudo /etc/init.d/tomcat6 start

NANO Editor Help
CTL+O = Save the file and then press Enter
CTL+X = Exit "nano"
CTL+K = Delete line
CTL+U = Undelete line
CTL+W = Search for %%string%%
CTL+\ = Search for %%string%% and replace with $$string$$
CTL+C = Show line numbers

More info = http://en.wikipedia.org/wiki/Nano_(text_editor)


Make the script executeable.

chmod 0755 /home/dspace/scripts/build-indexes

Then run the script as follows

/home/dspace/scripts/build-indexes

Template:CONSOLE

References

Standards

Back to Customisation
Back to Browse Indexes