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.
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)
Code Block |
---|
cdmkdir [path]/projects git svn clone http/path/to/project/discovery cd discovery svn checkout http://scm.dspace.org/svn/repo/modules/dspace-discovery/trunk/ dspace-trunk dspace-discoveryr 4961 git svn clonecheckout http://scm.dspace.org/svn/repo/modules/dspace-discovery/trunk/ dspace-trunk |
(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
edit trunk/dspace/pom.xml
adding
Code Block |
---|
<module>../../dspace-discovery</module>
|
and
Code Block |
---|
<dependency>
<groupId>org.dspace.discovery</groupId>
<artifactId>discovery-solr-provider</artifactId>
<version>0.9.1-SNAPSHOT</version>
</dependency>
|
-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:
Code Block |
---|
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.
Code Block |
---|
/dspace/bin/dspace update-discovery-index
|
- or -
Code Block /dspace/bin/dspace dsrun org.dspace.discovery.IndexClient
Screenshots
Empty search shows that it can be filtered easily.
edit trunk{*}/dspace/modules/xmlui/{*}pom.xml
adding
<dependency> <groupId>org.dspace.discovery</groupId> <artifactId>discovery-xmlui-block</artifactId> <version>0.9.1-SNAPSHOT</version></dependency>
!worddav7947eb9fb6e1b7e533036566580694ff.png|width=800!
ADD SOLR SEARCH
go to trunk/dspace/solr/
Add Dryad's SOLR core of search.
\[trunk/dspace/solr/\] $ svn export [<span style="color: #0000ff">{+}<span class="nobr"><a href="http://dryad.googlecode.com/svn/trunk/dryad/dspace/solr/search/+" class="external-link" rel="nofollow">http://dryad.googlecode.com/svn/trunk/dryad/dspace/solr/search/+<sup><img class="rendericon" src="/images/icons/linkext7.gif" height="7" width="7" align="absmiddle" alt="" border="0"/></sup></a></span></span>|http://dryad.googlecode.com/svn/trunk/dryad/dspace/solr/search/] search
edit /trunk/dspace/solr/solr.xml
add
<core name="search" instanceDir="search"/>
!worddave7a3e07dde9c80852c24ccaa78440679.png|width=800!
edit trunk/dspace/config/xmlui.xconf
<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/" />
!worddav4054e98eaa67a8c5a11157f83cce59e8.png|width=800! Wiki Markup