Unsupported Release

This documentation relates to an old, unsupported version of DSpace, version 1.7.x. Looking for another version? See all documentation.

As of January 2014, the DSpace 1.7.x platform is no longer supported. We recommend upgrading to a more recent version of DSpace.

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 2 Next »

Instructions for enabling Discovery in DSpace 1.7.0

As with any upgrade procedure, it is highly recommend that you backup your existing data thoroughly.  This includes cases where upgrading DSpace from 1.6.2 to 1.7.0.  Although upgrades in versions of Solr/Lucene do tend to be forwards compatible for the data stored in the Lucene index, it is always a best practice to backup your dspace.dir/solr/statistics cores to assure no data is lost.

  1. Enable the Discovery Aspects in the XMLUI by changing the following settings in config/xmlui.xconf
    1. Comment out: SearchArtifacts
    2. Uncomment: Discovery
      <xmlui>
          <aspects>
              <aspect name="Artifact Browser" path="resource://aspects/ArtifactBrowser/" />
              <aspect name="Browsing Artifacts" path="resource://aspects/BrowseArtifacts/" />
              <!--<aspect name="Searching Artifacts" path="resource://aspects/SearchArtifacts/" />-->
              <aspect name="Administration" path="resource://aspects/Administrative/" />
              <aspect name="E-Person" path="resource://aspects/EPerson/" />
              <aspect name="Submission and Workflow" path="resource://aspects/Submission/" />
      	<aspect name="Statistics" path="resource://aspects/Statistics/" />
      
              <!--
                  To enable Discovery, uncomment this Aspect that will enable it
                  within your existing XMLUI
                  Also make sure to comment the SearchArtifacts aspect
                  as leaving it on together with discovery will cause UI overlap issues-->
              <aspect name="Discovery" path="resource://aspects/Discovery/" />
      
      
              <!--
                  This aspect tests the various possible DRI features,
                  it helps a theme developer create themes
              -->
              <!-- <aspect name="XML Tests" path="resource://aspects/XMLTest/"/> -->
          </aspects>
      
  2. Enable the Discovery Indexing Consumer that will update Discovery Indexes on changes to content in XMLUI, JSPUI, SWORD, and LNI in config/dspace.cfg
    1. Add discovery to the list of event.dispatcher.default.consumers
    2. Change recent.submissions.count to zero
      #### Event System Configuration ####
      
      # default synchronous dispatcher (same behavior as traditional DSpace)
      event.dispatcher.default.class = org.dspace.event.BasicDispatcher
      #event.dispatcher.default.consumers = search, browse, eperson, harvester
      event.dispatcher.default.consumers = search, browse, discovery, eperson, harvester
      
      #Put the recent submissions count to 0 so that discovery can use it's recent submissions,
      # not doing this when discovery is enabled will cause UI overlap issues
      #How many recent submissions should be displayed at any one time
      #recent.submissions.count = 5
      recent.submissions.count = 0
      
  3. Check that the port is correct for solr.search.server in config/dspace-solr-search.cfg
    1. If all of your traffic runs over port 80, then you need to remove the port from the URL
      ##### Search Indexing #####
      solr.search.server = http://localhost/solr/search
      
  4. From the command line, navigate to the dspace directory and run the command below to index the content of your DSpace instance into Discovery.
    ./bin/dspace update-discovery-index
    

    NOTE: This step may take some time if you have a large number of items in your repository.

Instructions for Configuring Discovery

Discovery can be configured at multiple levels of the application. Outlined below will be where in Discovery changes can be made that will alter the presentation. The primary place that the user experience is altered in XMLUi is through the dspace-solr-search.cfg file

Configuring Facets that are Exposed for Search Results

##### Search Indexing #####
solr.search.server = http://localhost:8080/solr/search

# Should no solr facet be configured for a certain page, this one will be used as default
#Every solr facet field which ends with _dt will be handled as a date
#Handeling as date implies that {field.name}.year will be used for faceting
solr.facets.search=dc.contributor.author,dc.subject,dc.date.issued_dt

solr.facets.site=dc.contributor.author,dc.subject,dc.date.issued_dt
solr.facets.community=dc.contributor.author,dc.subject,dc.date.issued_dt
solr.facets.collection=dc.contributor.author,dc.subject,dc.date.issued_dt
# solr.facets.item=dc.contributor.author,dc.subject,dc.date.issued_dt


# Put any default search filters here, these filters will be applied to any search in discovery
# You can specify multiple filters by separating them using ,
##Default filters are used for every search in discovery, including the separate scope filters below
#solr.default.filterQuery=location:l2
# You can also specify (additional) filter(s)
## for homepage recent submissions
#solr.site.default.filterQuery=
## for community recent submissions
#solr.community.default.filterQuery=
## for collection recent submissions
#solr.collection.default.filterQuery=
## for searches
#solr.search.default.filterQuery=
## for browsing (not used at the moment)
#solr.browse.default.filterQuery=

# The filters which can be selected in the search form
solr.search.filters=dc.title, dc.contributor.author, dc.subject, dc.date.issued.year

# Indexed fields which can sorted on in our search
solr.search.sort=dc.title, dc.date.issued_dt

#Defines whichs fields are indexed as dates
#please be aware that for each date field an _dt will be suffixed so that dc.date.issued will become dc.date.issued_dt
#For each date indexed the year will also be stored separately in a {field.name}.year so it can be used for date faceting
solr.index.type.date=dc.date,dc.date.*

#Recent submission size
solr.recent-submissions.size=5
#The indexed field on which we sort so we can determine which items where recently submitted
recent.submissions.sort-option=dc.date.accessioned_dt

#Use the property below to limit the number of facet filters in the side of the search page
#search.facet.max=10

Advanced Configuration in Solr

Solr itself now runs two cores.  One for collection DSpace Solr based "statistics", the other for Discovery Solr based "search"

solr
├── search
│   ├── conf
│   │   ├── admin-extra.html
│   │   ├── elevate.xml
│   │   ├── protwords.txt
│   │   ├── schema.xml
│   │   ├── scripts.conf
│   │   ├── solrconfig.xml
│   │   ├── spellings.txt
│   │   ├── stopwords.txt
│   │   ├── synonyms.txt
│   │   └── xslt
│   │       ├── DRI.xsl
│   │       ├── example.xsl
│   │       ├── example_atom.xsl
│   │       ├── example_rss.xsl
│   │       └── luke.xsl
│   └── conf2
├── solr.xml
└── statistics
    └── conf
        ├── admin-extra.html
        ├── elevate.xml
        ├── protwords.txt
        ├── schema.xml
        ├── scripts.conf
        ├── solrconfig.xml
        ├── spellings.txt
        ├── stopwords.txt
        ├── synonyms.txt
        └── xslt
            ├── example.xsl
            ├── example_atom.xsl
            ├── example_rss.xsl
            └── luke.xsl

Howto: Use DSpace Discovery
The Discovery Module enables your repository to have faceted searching.
Thus a user can filter what they are looking for by grouping entries into a facet, and drill down to find the content they are interested in. 
So instead of user searching: [ wetland + "dc.author=Mitsch, William J" + dc.subject="water quality" ], they can instead do their initial search, [ wetland ], and then filter the results by attributes.
Unable to render embedded object: File (worddava7d46df6db45f7ce78511e9f8e78b098.png) not found.

A website like Amazon, might do this to help you select a digital camera. You can reduce the results by price range, features, megapixels, manufacturer, etc.
The further the DSpace Discovery module is developed, the more useful that browsing can be to the researcher looking for items in your collections.

Checkout the projects from source (revision numbers are from revision last tested)

mkdir /path/to/project/discovery
cd discovery
svn checkout http://scm.dspace.org/svn/repo/dspace/trunk/ dspace-trunk -r 4961
svn checkout http://scm.dspace.org/svn/repo/modules/dspace-discovery/trunk/ dspace-discovery -r 4846

Reference
If you want see Discovery in action and try it out live, the Dryad Repository has discovery instead of artifact browse. You can also browse their Google Code  which has the source of their customizations.

Overview
Have both projects checked out to the same root projects folder. You will not have to modify dspace-discovery at all, but the patch will enable the dspace-trunk to use some features of dspace services, and include other libraries such as org.apache.solr that are needed.
The discovery module essentially adds an additional core to solr. Existing was statistics, the new core is search. 

Obtain the updated patch

To patch: 

cd /path/to/project/discovery/dspace-trunk/dspace
patch -p1 < /path/to/dspace-discovery-update3.patch

If you name discovery-trunk anything other than that, you will have to modify dspace-trunk/dspace/pom.xml accordingly.
Then the regular rebuild process applies.

Once you've restarted tomcat, and SOLR is up and running, you'll need to index your content.

/dspace/bin/dspace update-discovery-index
  • or -
    /dspace/bin/dspace dsrun org.dspace.discovery.IndexClient
    

Screenshots
Empty search shows that it can be filtered easily.

  • No labels