Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Wiki Markup
*Howto: Use DSpace
Discovery

Checkout the projects

...

 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. 
!worddava7d46df6db45f7ce78511e9f8e78b098.png|height=855,width=804! 

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 source

  1. A Fresh Copy of the DSpace Trunk
    svn checkout {+}http://scm.dspace.org/svn/repo

...

  1. /dspace

...

  1. /trunk/

...

  1. +Image Added dspace-trunk
  2. The Discovery Modulesvn checkout http://scm.dspace.org/svn/repo/modules/dspace-discovery/trunk/

...

  1. Image Added dspace-

...

(Alternatively svn users can just regular svn co those above. Clone is for git, because git doesn't exactly do checkout)
(GIT ONLY) git svn doesn't add empty directories, so to correct that, type:

Code Block

[dspace-trunk-git/dspace/\]$
mkdir -p modules/jspui/src/main/webapp 
mkdir -p modules/lni/src/main/webapp 
mkdir -p modules/oai/src/main/webapp 
mkdir -p modules/solr/src/main/webapp 
mkdir -p modules/sword/src/main/webapp 
mkdir -p modules/xmlui/src/main/webapp   

Edit POM's

...

  1. discovery Reference
    For reference, look at the Dryad project {+}http://code.google.com/p/dryad/+Image Added as that is using the discovery layer.
    http://code.google.com/p/dryad/ 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. 
    To patch: 
    cd /path/to/project/dspace-trunk/dspace
    patch -p1 < /path/to/discovery-applied-to-dspace-trunk.patch
    If you name discovery-trunk anything other than that, you will have to modify dspace-trunk/dspace/pom.xml

...

Code Block
 
<module>../../dspace-discovery</module> 

Image Removed

and

Code Block

<dependency>   
 <groupId>org.dspace.discovery</groupId>   
 <artifactId>discovery-solr-provider</artifactId>    
 <version>0.9.1-SNAPSHOT</version>
</dependency> 

Image Removed

edit trunk/dspace/modules/xmlui/pom.xml
adding

Code Block

<dependency>
    <groupId>org.dspace.discovery</groupId>
    <artifactId>discovery-xmlui-block</artifactId>
    <version>0.9.1-SNAPSHOT</version>
</dependency> 

Image Removed
ADD SOLR SEARCH
go to trunk/dspace/solr/
Add Dryad's SOLR core of search.

Code Block
 
[trunk/dspace/solr/] $ svn export http://dryad.googlecode.com/svn/trunk/dryad/dspace/solr/search/ search 

edit /trunk/dspace/solr/solr.xml
add

Code Block
 
<core name="search" instanceDir="search"/> 

Image Removed
edit trunk/dspace/config/xmlui.xconf

Code Block

    <aspects> 
        <!-- 
            (1) Remove Artifact Browser as Browse/Search is supported in Discovery 
            <aspect name="Artifact Browser" path="resource://aspects/ArtifactBrowser/" /> 
            (2) Feedback holds the Contact / Feedback aspects 
        --> 
            <aspect name="Feedback" path="resource://aspects/Feedback/" /> 
        <!--  
            (3) Discovery holds Both Viewers, Recent Submissions and Search/Browse. 
        --> 
        <aspect name="Discovery" path="resource://aspects/Discovery/" /> 
  1. accordingly.
    Then the regular rebuild process applies. It may be necessary to do a mvn clean package.

In config/dspace-solr-search.cfg and dspace.cfg is a setting for:
solr.search.server = http://127.0.0.1:8080/solrImage Added
Adjust that if necessary.
After the patch, you will need to set solr/home. Modify /dspace/webapps/solr/WEB-INF/web.xml to use your solr/home. 
    <env-entry>
       <env-entry-name>solr/home</env-entry-name>
       <env-entry-value>/dspace/solr</env-entry-value>
       <env-entry-type>java.lang.String</env-entry-type>
    </env-entry>

Wiki Markup
Once you've restarted your \{tomcat\} server, and SOLR is up and running, you'll need to index your content. 
\[/dspace/bin/\] ./dspace update-discovery-index 

  • Wiki Markup
    or -
    Once, [<span style="color: #0000ff">{+}<span class="nobr"><a href="http://jira.dspace.org/jira/browse/DS-516+" class="external-link" rel="nofollow">http://jira.dspace.org/jira/browse/DS-516+<sup><img class="rendericon" src="/images/icons/linkext7.gif" height="7" width="7" align="absmiddle" alt="" border="0"/></sup></a></span></span>|http://jira.dspace.org/jira/browse/DS-516] is committed it can be invoked by: 
    \[/dspace/bin/\] ./dspace dsrun org.dspace.discovery.IndexClient   *Screenshots* 
    Empty search shows that it can be filtered easily. 
    !worddave0432a807dfbee0a0920d684f5c5e9e5.png|height=843,width=858! 

...