...
- download apache-solr-3.5.0.tgz fromhttp://archive.apache.org/dist/lucene/solr/3.5.0/
tar xvzf apache-solr-3.5.0.tgz
mkdir [dspace]/solr/lib
cp ./apache-solr-3.5.0/dist/apache-solr-velocity-3.5.0.jar [dspace]/solr/lib
cp ./apache-solr-3.5.0/contrib/velocity/lib/{commons-beanutils-1.7.0.jar,commons-collections-3.2.1.jar,velocity-1.6.4.jar,velocity-tools-2.0.jar} [dspace]/solr/lib
edit
[dspace]/solr/solr.xml
and add thesharedLib
attribute:Code Block language html/xml <solr persistent="false" sharedLib="lib">
edit the solrconfig.xml file of each core where you want to use Solritas. Example for the "search" core: add the velocity ResponseWriter and requestHandler in
[dspace]/solr/search/conf/solrconfig.xml
:Code Block language html/xml <queryResponseWriter name="velocity" class="solr.VelocityResponseWriter"/> <requestHandler name="/browse" class="solr.SearchHandler"> <lst name="defaults"> <str name="v.template">browse</str> <str name="v.contentType">text/html;charset=UTF-8</str> <str name="title">Solritas</str> <str name="wt">velocity</str> <str name="defType">dismax</str> <str name="q.alt">*:*</str> <str name="rows">10</str> <str name="fl">*,score</str> <str name="facet">on</str> <str name="facet.field">title</str> <str name="facet.mincount">1</str> <str name="qf"> text^0.5 title^1.5 </str> </lst> <!--<lst name="invariants">--> <!--<str name="v.base_dir">/solr/contrib/velocity/src/main/templates</str>--> <!--</lst>--> </requestHandler>
cp -r ./apache-solr-3.5.0/example/solr/conf/velocity [dspace]/solr/search/conf/
- restart Tomcat
- Solritas should be available at http://localhost:8080/solr/search/browse/
It should also be possible to use it in DSpace 1.6-1.8, but these use different versions of Solr, so modify the procedure accordingly (and expect other caveats):
...